From bf6ebcc3d86fc17f176e042b1de66fb962683f04 Mon Sep 17 00:00:00 2001 From: cahrens Date: Wed, 14 Aug 2013 16:13:33 -0400 Subject: [PATCH 1/2] Add deserialize logic for metadata fields. STUD-640 Handle the case of the double-quotes appearing within the string. We don't need to worry about the whole concatenated ID being double-quoted, since the concatenation was done by overriding xml_module's export method. Use the method already fined in XmlDescriptor. --- .../lib/xmodule/xmodule/tests/test_video.py | 56 +++++++++++++++++++ common/lib/xmodule/xmodule/video_module.py | 17 +++++- common/lib/xmodule/xmodule/xml_module.py | 13 +++-- 3 files changed, 80 insertions(+), 6 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 4a13d565cca4..a8810a1238d1 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -263,6 +263,62 @@ def test_from_xml_no_attributes(self): 'data': '' }) + def test_from_xml_double_quotes(self): + """ + Make sure we can handle the double-quoted string format (which was used for exporting for + a few weeks). + """ + module_system = DummySystem(load_error_modules=True) + xml_data =''' +