

def test_failure(self):
    'Test with DisabledCapabilityServiceStub\n    '
    apiproxy_stub_map.apiproxy.RegisterStub('capability_service', mocked_capability_stub.DisabledCapabilityServiceStub())
    response = self.client.get('/')
    self.assertEqual(response.status_code, 302)
    self.assertEqual(response.headers['Location'], 'http://localhost/maintenance_page')
    response = self.client.get('/index2')
    self.assertEqual(response.status_code, 302)
    self.assertEqual(response.headers['Location'], 'http://localhost/no_decorator')
    response = self.client.get('/no_decorator')
    self.assertEqual(response.status_code, 200)

dataset/ETHPy150Open IanLewis/kay/kay/tests/decorator_test.py MaintenanceCheckTestCase.test_failure/original