Fix a bug in extracting HTML

Update tests to reflect new behavior.
This commit is contained in:
Diana Huang
2013-03-06 10:34:57 -05:00
parent 455dea870f
commit 4b7d1deb25
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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,