Updated the expected error message to get assertion successful for both python versions

changes made as suggested
This commit is contained in:
aarif
2019-10-03 12:23:48 +05:00
parent a383c7fdb8
commit 91bed37922

View File

@@ -821,6 +821,9 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase):
Verify we handle error cases when patching the language_proficiencies
field.
"""
if six.PY3:
expected_error_message = six.text_type(expected_error_message).replace('unicode', 'str')
client = self.login_client("client", "user")
response = self.send_patch(client, {"language_proficiencies": patch_value}, expected_status=400)
self.assertEqual(