Merge pull request #21917 from edx/BOM-889

Updated the expected error message to make it compatible for both python versions - BOM-889
This commit is contained in:
Aarif
2019-10-09 16:43:41 +05:00
committed by GitHub

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(