Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_should_return_internal_server_error_when_simulate_server_error_is_true(self):
behaviour.server_failure.enable()
data = self.es.index(index=INDEX_NAME, doc_type=DOC_TYPE, body=BODY)
expected = {
'status_code': 500,
'error': 'Internal Server Error'
}
self.assertDictEqual(expected, data)
def test_should_return_internal_server_error_when_simulate_server_error_is_true(self):
behaviour.server_failure.enable()
data = self.es.index(index=self.index_name, doc_type=self.doc_type, body=self.body)
expected = {
'status_code': 500,
'error': 'Internal Server Error'
}
self.assertDictEqual(expected, data)