diff --git a/three_d_viewer/tests.py b/three_d_viewer/tests.py index 5b9a61f..dd3417d 100644 --- a/three_d_viewer/tests.py +++ b/three_d_viewer/tests.py @@ -81,3 +81,10 @@ class ModelsTest(TestCase): question=testquestion) result = ajax.check_answer(None, testanswer.id, testquestion.id) self.assertEqual('{"result": false}', result) + + def test_ajax_check_answer_incorrect(self): + testquestion = Question.objects.create(text="Test", sample_id=1) + testanswer = Answer.objects.create(text="Test", correct=True, + question=testquestion) + result = ajax.check_answer(None, testanswer.id + 1, testquestion.id) + self.assertEqual('{"result": false}', result)