diff options
author | Prabhu Ramachandran | 2017-03-08 15:59:18 +0530 |
---|---|---|
committer | GitHub | 2017-03-08 15:59:18 +0530 |
commit | 0a8000387b3edd463cc58b7fb85f76639f10b150 (patch) | |
tree | 3aba6618219a203a3bda5d4c85ef0ad1c229ab1d /yaksh/test_models.py | |
parent | aede1c3736077387d63eacd20c2c39d8875e605d (diff) | |
parent | f57cfacf41f8a1d72a56ea8c875f906e7db2a15e (diff) | |
download | online_test-0a8000387b3edd463cc58b7fb85f76639f10b150.tar.gz online_test-0a8000387b3edd463cc58b7fb85f76639f10b150.tar.bz2 online_test-0a8000387b3edd463cc58b7fb85f76639f10b150.zip |
Merge pull request #229 from ankitjavalkar/reattempt-mcq
Allow to reattempt all types of questions
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r-- | yaksh/test_models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py index 91d8806..cd66aed 100644 --- a/yaksh/test_models.py +++ b/yaksh/test_models.py @@ -662,7 +662,7 @@ class AnswerPaperTestCases(unittest.TestCase): current_question = self.answerpaper.current_question() self.assertEqual(current_question.id, 1) # Test completed_question() method of Answer Paper - question = self.answerpaper.completed_question(1) + question = self.answerpaper.add_completed_question(1) self.assertEqual(self.answerpaper.questions_left(), 2) # Test next_question() method of Answer Paper @@ -694,7 +694,7 @@ class AnswerPaperTestCases(unittest.TestCase): # Then self.assertTrue(next_question_id is not None) - self.assertEqual(next_question_id.id, 2) + self.assertEqual(next_question_id.id, 1) # Given, last question in the list current_question_id = 3 @@ -704,7 +704,7 @@ class AnswerPaperTestCases(unittest.TestCase): # Then self.assertTrue(next_question_id is not None) - self.assertEqual(next_question_id.id, 2) + self.assertEqual(next_question_id.id, 1) # Test get_questions_answered() method # When @@ -724,14 +724,14 @@ class AnswerPaperTestCases(unittest.TestCase): # Test completed_question and next_question # When all questions are answered - current_question = self.answerpaper.completed_question(2) + current_question = self.answerpaper.add_completed_question(2) # Then self.assertEqual(self.answerpaper.questions_left(), 1) self.assertEqual(current_question.id, 3) # When - current_question = self.answerpaper.completed_question(3) + current_question = self.answerpaper.add_completed_question(3) # Then self.assertEqual(self.answerpaper.questions_left(), 0) |