From 66287d0d9955c1524a08ecc0250f1ea74a168678 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 17 Jul 2013 18:35:49 -0400 Subject: [PATCH 1/2] fix test to use the new create_item method rather than clone_item, which has been deprecated, and thus breaking the test --- cms/djangoapps/contentstore/tests/test_contentstore.py | 7 ++----- common/lib/xmodule/xmodule/video_module.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 200f2575df..500db414f4 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -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()) diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index ecc1813c4c..5354297c2b 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -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('