Commit 68f2c1ab authored by Łukasz Nowak's avatar Łukasz Nowak

Assert equality.

It is simpler and produces understandable message in case of error.
parent 87227272
......@@ -161,8 +161,7 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
self.assertBasicResponse()
self.assertResponseCode(400)
self.assertResponseJson()
self.assertTrue('error' in self.json_response)
self.assertEqual("Data is not json object.", self.json_response['error'])
self.assertEqual({'error': "Data is not json object."}, self.json_response)
self.assertPersonRequestSimulatorEmpty()
def test_bad_json(self):
......@@ -174,8 +173,7 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
self.assertBasicResponse()
self.assertResponseCode(400)
self.assertResponseJson()
self.assertTrue('error' in self.json_response)
self.assertEqual("Data is not json object.", self.json_response['error'])
self.assertEqual({'error': "Data is not json object."}, self.json_response)
self.assertPersonRequestSimulatorEmpty()
def test_empty_json(self):
......@@ -669,8 +667,7 @@ class TestInstancePOSTbang(VifibSlaposRestAPIV1BangMixin):
self.assertBasicResponse()
self.assertResponseCode(400)
self.assertResponseJson()
self.assertTrue('error' in self.json_response)
self.assertEqual("Data is not json object.", self.json_response['error'])
self.assertEqual({'error': "Data is not json object."}, self.json_response)
self.assertInstanceBangSimulatorEmpty()
def test_bad_json(self):
......
25
\ No newline at end of file
26
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment