diff --git a/cms/djangoapps/contentstore/views/tests/test_import_export.py b/cms/djangoapps/contentstore/views/tests/test_import_export.py index fb44a0c420..17c30f51fa 100644 --- a/cms/djangoapps/contentstore/views/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/views/tests/test_import_export.py @@ -427,3 +427,20 @@ class ExportTestCase(CourseTestCase): self.assertEqual(video_xml.get('youtube_id_1_0'), youtube_id) finally: shutil.rmtree(root_dir / name) + + def test_export_success_with_custom_tag(self): + """ + Verify that course export with customtag + """ + xml_string = 'slides' + vertical = ItemFactory.create( + parent_location=self.course.location, category='vertical', display_name='foo' + ) + ItemFactory.create( + parent_location=vertical.location, + category='customtag', + display_name='custom_tag_foo', + data=xml_string + ) + + self.test_export_targz_urlparam() diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index b53d0550af..1d788b6b3e 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -446,7 +446,7 @@ class XmlParserMixin(object): node.tag = xml_object.tag node.text = xml_object.text node.tail = xml_object.tail - node.attrib = xml_object.attrib + node.attrib.update(xml_object.attrib) node.extend(xml_object) node.set('url_name', self.url_name)