summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorprathamesh2016-08-31 01:32:16 +0530
committerprathamesh2016-08-31 01:32:16 +0530
commit11dec9deba7120f85d3d2b47cfd31fca8587bbbc (patch)
tree22c99d7a50f193b9a206732a05d246921f487cf6 /yaksh/test_models.py
parentc0909251ecffcdc0df34bb9ad4a90994708c3a5c (diff)
downloadonline_test-11dec9deba7120f85d3d2b47cfd31fca8587bbbc.tar.gz
online_test-11dec9deba7120f85d3d2b47cfd31fca8587bbbc.tar.bz2
online_test-11dec9deba7120f85d3d2b47cfd31fca8587bbbc.zip
Added testcases for model and view.
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 8bd2dda..94178a0 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):