Commit 29a125d5 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Workaround unicode comparation with json.dumps

parent 8e6500e2
Pipeline #29506 failed with stage
in 0 seconds
...@@ -748,7 +748,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin): ...@@ -748,7 +748,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin):
self.assertSameSet(response_dict.keys(), ["common_name", "certificate", "id", "key"]) self.assertSameSet(response_dict.keys(), ["common_name", "certificate", "id", "key"])
self.assertEqual(response_dict["id"], login.getDestinationReference()) self.assertEqual(response_dict["id"], login.getDestinationReference())
self.assertEqual(response_dict["common_name"], login.getReference()) self.assertEqual(json.dumps(response_dict["common_name"]), json.dumps(login.getReference()))
self.assertEqual(self.portal.REQUEST.RESPONSE.getStatus(), 200) self.assertEqual(self.portal.REQUEST.RESPONSE.getStatus(), 200)
new_response_dict = json.loads(person.Person_getCertificate()) new_response_dict = json.loads(person.Person_getCertificate())
...@@ -764,7 +764,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin): ...@@ -764,7 +764,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin):
self.assertNotEqual(login.getDestinationReference(), new_login.getDestinationReference()) self.assertNotEqual(login.getDestinationReference(), new_login.getDestinationReference())
self.assertSameSet(new_response_dict.keys(), ["common_name", "certificate", "id", "key"]) self.assertSameSet(new_response_dict.keys(), ["common_name", "certificate", "id", "key"])
self.assertEqual(new_response_dict["common_name"], new_login.getReference()) self.assertEqual(json.dumps(new_response_dict["common_name"]), json.dumps(new_login.getReference()))
self.assertEqual(new_response_dict["id"], new_login.getDestinationReference()) self.assertEqual(new_response_dict["id"], new_login.getDestinationReference())
self.assertNotEqual(new_response_dict["common_name"], response_dict["common_name"]) self.assertNotEqual(new_response_dict["common_name"], response_dict["common_name"])
......
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