Commit 78424e16 by Diana Huang

Fix some of the tests so that they work with the new changes

to capa_problem
parent 17680a33
......@@ -108,7 +108,9 @@ class CapaFactory(object):
else:
instance_state = None
module = CapaModule(test_system(), location,
system = test_system()
system.render_template = Mock(return_value="<div>Test Template HTML</div>")
module = CapaModule(system, location,
definition, descriptor,
instance_state, None, metadata=metadata)
......@@ -185,6 +187,7 @@ class CapaModuleTest(unittest.TestCase):
max_attempts="1",
attempts="0",
due=self.yesterday_str)
self.assertTrue(after_due_date.answer_available())
......
......@@ -106,7 +106,7 @@ class ConditionalModuleTest(unittest.TestCase):
html = module.get_html()
print "html type: ", type(html)
print "html: ", html
html_expect = "<div>{'ajax_url': 'courses/course_id/modx/a_location', 'element_id': 'i4x-edX-cond_test-conditional-condone', 'id': 'i4x://edX/cond_test/conditional/condone'}</div>"
html_expect = "{'ajax_url': 'courses/course_id/modx/a_location', 'element_id': 'i4x-edX-cond_test-conditional-condone', 'id': 'i4x://edX/cond_test/conditional/condone'}"
self.assertEqual(html, html_expect)
gdi = module.get_display_items()
......
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