From f9476ab4ff189d35e4dd55629fa5796695b01428 Mon Sep 17 00:00:00 2001 From: Qubad786 Date: Mon, 21 May 2018 18:35:38 +0500 Subject: [PATCH 1/2] Update old transcripts metadata present in video xml with the new transcripts for backward compatibility. --- .../lib/xmodule/xmodule/tests/test_video.py | 20 +++++- .../xmodule/video_module/video_module.py | 47 +++++++++---- common/lib/xmodule/xmodule/xml_module.py | 21 ++++-- .../courseware/tests/test_video_mongo.py | 70 ++++++++++++++++++- requirements/edx/base.in | 2 +- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/github.in | 2 + requirements/edx/testing.txt | 5 +- 9 files changed, 144 insertions(+), 27 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 0e2db392a2..1addb31451 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -716,7 +716,12 @@ class VideoExportTestCase(VideoDescriptorTestBase): Test that we write the correct XML on export. """ edx_video_id = u'test_edx_video_id' - mock_val_api.export_to_xml = Mock(return_value=etree.Element('video_asset')) + mock_val_api.export_to_xml = Mock( + return_value=dict( + xml=etree.Element('video_asset'), + transcripts={} + ) + ) self.descriptor.youtube_id_0_75 = 'izygArpw-Qo' self.descriptor.youtube_id_1_0 = 'p2Q6BrNhdh8' self.descriptor.youtube_id_1_25 = '1EeWXzPdhSA' @@ -736,14 +741,23 @@ class VideoExportTestCase(VideoDescriptorTestBase): xml = self.descriptor.definition_to_xml(self.file_system) parser = etree.XMLParser(remove_blank_text=True) xml_string = '''\ -