Commit 4b7d1deb by Diana Huang

Fix a bug in extracting HTML

Update tests to reflect new behavior.
parent 455dea87
......@@ -331,7 +331,7 @@ class LoncapaProblem(object):
'''
Main method called externally to get the HTML to be rendered for this capa Problem.
'''
html = contextualize_text(etree.tostring(self.extracted_tree), self.context)
html = contextualize_text(etree.tostring(self._extract_html(self.tree)), self.context)
return html
......
......@@ -125,6 +125,8 @@ class CapaHtmlRenderTest(unittest.TestCase):
expected_solution_context = {'id': '1_solution_1'}
expected_calls = [mock.call('textline.html', expected_textline_context),
mock.call('solutionspan.html', expected_solution_context),
mock.call('textline.html', expected_textline_context),
mock.call('solutionspan.html', expected_solution_context)]
self.assertEqual(test_system.render_template.call_args_list,
......
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