Commit 2f0a8150 by Vasyl Nakvasiuk Committed by Alexander Kryklia

add test_poll_xmodule

parent 92aa8b90
...@@ -318,6 +318,22 @@ class ImportTestCase(unittest.TestCase): ...@@ -318,6 +318,22 @@ class ImportTestCase(unittest.TestCase):
self.assertEqual(len(video.url_name), len('video_') + 12) self.assertEqual(len(video.url_name), len('video_') + 12)
def test_poll_xmodule(self):
modulestore = XMLModuleStore(DATA_DIR, course_dirs=['poll'])
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), 3)
def test_error_on_import(self): def test_error_on_import(self):
'''Check that when load_error_module is false, an exception is raised, rather than returning an ErrorModule''' '''Check that when load_error_module is false, an exception is raised, rather than returning an ErrorModule'''
......
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