Commit f7a83cdc by Chris Dodge

wip: add test case for exporting/importing a private module

parent 1a1635d4
......@@ -302,6 +302,16 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
root_dir = path(mkdtemp_clean())
# now create a private vertical
private_vertical = draft_store.clone_item(vertical.location,
Location(['i4x', 'edX', 'full', 'vertical', 'a_private_vertical', None]))
# add private to list of children
sequential = module_store.get_item(Location(['i4x', 'edX', 'full',
'sequential', 'Administrivia_and_Circuit_Elements', None]))
module_store.update_children(sequential.location, sequential.children + [private_vertical.location.url()])
print 'Exporting to tempdir = {0}'.format(root_dir)
# export out to a tempdir
......@@ -357,6 +367,12 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
for child in vertical.get_children():
self.assertTrue(hasattr(child, 'is_draft'))
# verify that we have the private vertical
test_private_vertical = draft_store.get_item(Location(['i4x', 'edX', 'full',
'vertical', 'vertical_66', None]))
self.assertTrue(hasattr(test_private_vertical, 'is_draft'))
shutil.rmtree(root_dir)
def test_course_handouts_rewrites(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