diff options
Diffstat (limited to 'yaksh/evaluator_tests')
-rw-r--r-- | yaksh/evaluator_tests/test_simple_question_types.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/yaksh/evaluator_tests/test_simple_question_types.py b/yaksh/evaluator_tests/test_simple_question_types.py index d2996e4..2d991a7 100644 --- a/yaksh/evaluator_tests/test_simple_question_types.py +++ b/yaksh/evaluator_tests/test_simple_question_types.py @@ -554,6 +554,15 @@ class MCQQuestionTestCases(unittest.TestCase): attempt_num=1, course_id=self.course.id ) + self.answerpaper3 = AnswerPaper.objects.create( + user=self.user, + question_paper=self.question_paper, + course=self.course, + attempt_number=self.answerpaper.attempt_number+1, + start_time=timezone.now(), + end_time=timezone.now()+timedelta(minutes=5), + user_ip="127.0.0.1" + ) @classmethod def tearDownClass(self): @@ -571,6 +580,10 @@ class MCQQuestionTestCases(unittest.TestCase): self.answerpaper2 ) order2 = [tc.id for tc in user2_testcase] - + not_ordered_testcase = self.question1.get_ordered_test_cases( + self.answerpaper3 + ) + get_test_cases = self.question1.get_test_cases() # Then self.assertNotEqual(order1, order2) + self.assertEqual(get_test_cases, not_ordered_testcase) |