Merge pull request #22209 from edx/awais786/BOM-998

BOM-998
This commit is contained in:
Awais Qureshi
2019-11-01 19:31:38 +05:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -375,7 +375,9 @@ def check_transcripts(request):
except NotFoundError:
log.debug(u"Can't find transcripts in storage for non-youtube video_id: %s", html5_id)
if len(html5_subs) == 2: # check html5 transcripts for equality
transcripts_presence['html5_equal'] = json.loads(html5_subs[0]) == json.loads(html5_subs[1])
transcripts_presence['html5_equal'] = (
json.loads(html5_subs[0].decode('utf-8')) == json.loads(html5_subs[1].decode('utf-8'))
)
command, __ = _transcripts_logic(transcripts_presence, videos)

View File

@@ -1118,7 +1118,7 @@ class VideoBlockIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=xml_data_transcripts)
translations = descriptor.available_translations(descriptor.get_transcripts_info())
self.assertEqual(translations, ['hr', 'ge'])
self.assertEqual(sorted(translations), sorted(['hr', 'ge']))
def test_video_with_no_transcripts_translation_retrieval(self):
"""