summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index c0721f3..2136987 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -252,6 +252,18 @@ class QuizTestCases(unittest.TestCase):
)
self.assertEqual(trial_quiz.time_between_attempts, 0)
+ def test_view_answerpaper(self):
+ self.assertFalse(self.quiz1.view_answerpaper)
+ self.assertFalse(self.quiz2.view_answerpaper)
+
+ # When
+ self.quiz1.view_answerpaper = True
+ self.quiz1.save()
+
+ # Then
+ self.assertTrue(self.quiz1.view_answerpaper)
+
+
###############################################################################
class QuestionPaperTestCases(unittest.TestCase):