def test_es_disabled(self): response = ESExceptionMiddleware().process_request(self.fake_request) eq_(response.status_code, 501)
def test_es_disabled(self): response = ESExceptionMiddleware().process_request(self.fake_request) eq_(response.status_code, 501) self.assertTemplateUsed(response, 'elasticutils/501.html')
def test_exceptions(self): for exc in ES_EXCEPTIONS: response = ESExceptionMiddleware().process_exception( self.fake_request, exc(Exception)) eq_(response.status_code, 503)
def test_exceptions(self): for exc in ES_EXCEPTIONS: response = ESExceptionMiddleware().process_exception( self.fake_request, exc(Exception)) eq_(response.status_code, 503) self.assertTemplateUsed(response, 'elasticutils/503.html')