Commit d60b4eed by Shrhawk

Merge pull request #7871 from edx/shr/bug/TNL-2094-6.00.x-export-issue

update the attrib using dict-->update() function
parents 31a19c0f 1175047d
...@@ -427,3 +427,20 @@ class ExportTestCase(CourseTestCase): ...@@ -427,3 +427,20 @@ class ExportTestCase(CourseTestCase):
self.assertEqual(video_xml.get('youtube_id_1_0'), youtube_id) self.assertEqual(video_xml.get('youtube_id_1_0'), youtube_id)
finally: finally:
shutil.rmtree(root_dir / name) shutil.rmtree(root_dir / name)
def test_export_success_with_custom_tag(self):
"""
Verify that course export with customtag
"""
xml_string = '<impl>slides</impl>'
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()
...@@ -446,7 +446,7 @@ class XmlParserMixin(object): ...@@ -446,7 +446,7 @@ class XmlParserMixin(object):
node.tag = xml_object.tag node.tag = xml_object.tag
node.text = xml_object.text node.text = xml_object.text
node.tail = xml_object.tail node.tail = xml_object.tail
node.attrib = xml_object.attrib node.attrib.update(xml_object.attrib)
node.extend(xml_object) node.extend(xml_object)
node.set('url_name', self.url_name) node.set('url_name', self.url_name)
......
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