Commit 5a36b7c3 by Vasyl Nakvasiuk

Word cloud: add test_import

parent dd5a7e7b
...@@ -382,7 +382,7 @@ class ImportTestCase(BaseCourseTestCase): ...@@ -382,7 +382,7 @@ class ImportTestCase(BaseCourseTestCase):
self.assertEqual(len(video.url_name), len('video_') + 12) self.assertEqual(len(video.url_name), len('video_') + 12)
def test_poll_and_conditional_xmodule(self): def test_poll_and_conditional_import(self):
modulestore = XMLModuleStore(DATA_DIR, course_dirs=['conditional_and_poll']) modulestore = XMLModuleStore(DATA_DIR, course_dirs=['conditional_and_poll'])
course = modulestore.get_courses()[0] course = modulestore.get_courses()[0]
...@@ -423,6 +423,22 @@ class ImportTestCase(BaseCourseTestCase): ...@@ -423,6 +423,22 @@ class ImportTestCase(BaseCourseTestCase):
<plot style="margin-top:15px;margin-bottom:15px;"/>""".strip() <plot style="margin-top:15px;margin-bottom:15px;"/>""".strip()
self.assertEqual(gst_sample.render, render_string_from_sample_gst_xml) self.assertEqual(gst_sample.render, render_string_from_sample_gst_xml)
def test_word_cloud_import(self):
modulestore = XMLModuleStore(DATA_DIR, course_dirs=['word_cloud'])
course = modulestore.get_courses()[0]
chapters = course.get_children()
ch1 = chapters[0]
sections = ch1.get_children()
self.assertEqual(len(sections), 1)
location = course.location
location = Location(location.tag, location.org, location.course,
'sequential', 'Problem_Demos')
module = modulestore.get_instance(course.id, location)
self.assertEqual(len(module.children), 2)
def test_cohort_config(self): def test_cohort_config(self):
""" """
Check that cohort config parsing works right. Check that cohort config parsing works right.
......
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