fix test to use the new create_item method rather than clone_item, which has been deprecated, and thus breaking the test

This commit is contained in:
Chris Dodge
2013-07-17 18:35:49 -04:00
parent 96a9d74190
commit 66287d0d99
2 changed files with 3 additions and 6 deletions

View File

@@ -816,12 +816,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self.assertGreater(len(verticals), 0)
new_component_location = Location('i4x', 'edX', 'toy', 'video', 'new_component')
source_template_location = Location('i4x', 'edx', 'templates', 'video', 'default')
module_store.clone_item(source_template_location, new_component_location)
parent = verticals[0]
module_store.update_children(parent.location, parent.children + [new_component_location.url()])
ItemFactory.create(parent_location=parent.location, category="video", display_name="untitled")
root_dir = path(mkdtemp_clean())

View File

@@ -133,7 +133,7 @@ class VideoDescriptor(VideoFields,
Override the base implementation. We don't actually have anything in the 'data' field
(it's an empty string), so we just return a simple XML element
"""
return etree.fromstring('<video />')
return etree.Element('video')
def _parse_video_xml(video, xml_data):