summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-10-05 19:56:07 +0530
committerGitHub2017-10-05 19:56:07 +0530
commit72c9a0f2a84925b9f8096702aa702e1deb49e2ce (patch)
tree7efe929fbc1d58d3ca3cd65753600d3b995c3ded /yaksh/test_models.py
parent9249ba66edecb68d5d946425974625b743386635 (diff)
parent2ffbca59a947bcef7f4ae28b2bd1d73d18179380 (diff)
downloadonline_test-72c9a0f2a84925b9f8096702aa702e1deb49e2ce.tar.gz
online_test-72c9a0f2a84925b9f8096702aa702e1deb49e2ce.tar.bz2
online_test-72c9a0f2a84925b9f8096702aa702e1deb49e2ce.zip
Merge pull request #344 from ankitjavalkar/allow-paper-revisit
Allow user to quit the paper manually and revisit the paper if necessary
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index fd31ca2..ac90c53 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -800,13 +800,14 @@ class AnswerPaperTestCases(unittest.TestCase):
# Then
self.assertEqual(self.answerpaper.questions_left(), 0)
- self.assertTrue(current_question is None)
+ self.assertTrue(current_question == self.answerpaper.questions.all()[0])
# When
next_question_id = self.answerpaper.next_question(current_question_id)
# Then
- self.assertTrue(next_question_id is None)
+ all_questions = self.questions.all()
+ self.assertTrue(next_question_id == all_questions[0])
def test_update_marks(self):
""" Test update_marks method of AnswerPaper"""