Make sure InstructorTask is committed.

This commit is contained in:
Brian Wilson
2013-06-18 15:07:15 -04:00
parent 5389bba490
commit fd206a4128
4 changed files with 14 additions and 13 deletions

View File

@@ -658,11 +658,11 @@ class CapaModuleTest(unittest.TestCase):
# Simulate answering a problem that raises the exception
with patch('capa.capa_problem.LoncapaProblem.rescore_existing_answers') as mock_rescore:
mock_rescore.side_effect = exception_class(u'test error u\03a9')
mock_rescore.side_effect = exception_class(u'test error \u03a9')
result = module.rescore_problem()
# Expect an AJAX alert message in 'success'
expected_msg = u'Error: test error u\03a9'
expected_msg = u'Error: test error \u03a9'
self.assertEqual(result['success'], expected_msg)
# Expect that the number of attempts is NOT incremented