@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user