python3 compatibility
This commit is contained in:
Ayub khan
2019-09-26 13:19:28 +05:00
parent 53e6f7ce8d
commit d1ff659942

View File

@@ -153,7 +153,12 @@ class TestPreferencesAPI(UserAPITestCase):
expected_status=204
)
response = self.send_get(self.client)
self.assertEqual({u"dict_pref": u"{u'int_key': 10}", u"string_pref": u"value"}, response.data)
if six.PY2:
pref_dict = {u"dict_pref": u"{u'int_key': 10}", u"string_pref": u"value"}
else:
# pylint: disable=unicode-format-string
pref_dict = {"dict_pref": "{'int_key': 10}", "string_pref": "value"}
self.assertEqual(pref_dict, response.data)
@ddt.data(
("different_client", "different_user"),