Commit 1131edc9 by John Eskew

Change test to reflect how XBlock handles control chars.

parent b31d1cb8
...@@ -752,11 +752,12 @@ class VideoExportTestCase(VideoDescriptorTestBase): ...@@ -752,11 +752,12 @@ class VideoExportTestCase(VideoDescriptorTestBase):
def test_export_to_xml_invalid_characters_in_attributes(self): 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' self.descriptor.display_name = 'Display\x1eName'
with self.assertRaises(ValueError): xml = self.descriptor.definition_to_xml(None)
self.descriptor.definition_to_xml(None) self.assertEqual(xml.get('display_name'), 'DisplayName')
def test_export_to_xml_unicode_characters(self): def test_export_to_xml_unicode_characters(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment