From 1131edc9a235dc69cb65460833732fc87ea34536 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 29 Jun 2016 11:37:00 -0400 Subject: [PATCH 1/2] Change test to reflect how XBlock handles control chars. --- common/lib/xmodule/xmodule/tests/test_video.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index e11147a43b..12c4042c87 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -752,11 +752,12 @@ class VideoExportTestCase(VideoDescriptorTestBase): def test_export_to_xml_invalid_characters_in_attributes(self): """ - Test XML export will raise TypeError by lxml library if contains illegal characters. + Test XML export will *not* raise TypeError by lxml library if contains illegal characters. + The illegal characters in a String field are removed from the string instead. """ - self.descriptor.display_name = '\x1e' - with self.assertRaises(ValueError): - self.descriptor.definition_to_xml(None) + self.descriptor.display_name = 'Display\x1eName' + xml = self.descriptor.definition_to_xml(None) + self.assertEqual(xml.get('display_name'), 'DisplayName') def test_export_to_xml_unicode_characters(self): """ From ea6812e954653e65c98b9184f22ca9489d1ff8be Mon Sep 17 00:00:00 2001 From: John Eskew Date: Fri, 8 Jul 2016 14:03:45 -0400 Subject: [PATCH 2/2] Update version of XBlock repo. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index bf8dca3556..8e7f360d47 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -70,7 +70,7 @@ git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 git+https://github.com/edx/pa11ycrawler.git@0.0.4#egg=pa11ycrawler==0.0.4 # Our libraries: -git+https://github.com/edx/XBlock.git@xblock-0.4.10#egg=XBlock==0.4.10 +git+https://github.com/edx/XBlock.git@xblock-0.4.11#egg=XBlock==0.4.11 -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@v0.2#egg=django-splash==0.2