Fix a bug in extracting HTML
Update tests to reflect new behavior.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user