BOM-618 Pass unicode to json.loads

This commit is contained in:
Feanil Patel
2019-09-18 16:26:55 -04:00
parent 6408f96e18
commit 3427c1abf3
4 changed files with 5 additions and 5 deletions

View File

@@ -973,7 +973,7 @@ class TestStudioTranscriptTranslationPostDispatch(TestVideo):
request = Request.blank('/translation', POST=post_data)
response = self.item_descriptor.studio_transcript(request=request, dispatch='translation')
self.assertEqual(response.status, '201 Created')
response = json.loads(response.body)
response = json.loads(response.text)
self.assertTrue(response["language_code"], "uk")
self.assertDictEqual(self.item_descriptor.transcripts, {})
self.assertTrue(edxval_api.get_video_transcript_data(video_id=response["edx_video_id"], language_code="uk"))

View File

@@ -243,7 +243,7 @@ class TestWordCloud(BaseTestXmodule):
for user in self.users:
self.assertDictEqual(
json.loads(responses[user.username].content),
json.loads(responses[user.username].content.decode('utf-8')),
{
'status': 'fail',
'error': 'Unknown Command!'