diff options
author | mahesh | 2017-09-01 15:55:15 +0530 |
---|---|---|
committer | mahesh | 2017-09-01 15:55:15 +0530 |
commit | ef1e14e19f8bf0c1f075253a71ead98742b3f4d8 (patch) | |
tree | ba60e55f730d71e4b2e55e3bddbc1efa825736ed /yaksh/test_models.py | |
parent | ce21ae0cf3ea3541d588b30c0ae1c56d64c82e1d (diff) | |
download | online_test-ef1e14e19f8bf0c1f075253a71ead98742b3f4d8.tar.gz online_test-ef1e14e19f8bf0c1f075253a71ead98742b3f4d8.tar.bz2 online_test-ef1e14e19f8bf0c1f075253a71ead98742b3f4d8.zip |
Adds test case to check if multiple answerpapers for same arguments are not created.
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r-- | yaksh/test_models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py index a940c0f..bc7f114 100644 --- a/yaksh/test_models.py +++ b/yaksh/test_models.py @@ -451,6 +451,13 @@ class QuestionPaperTestCases(unittest.TestCase): self.assertFalse(self.question_paper.is_prerequisite_passed(self.user)) # test can_attempt_now(self): self.assertFalse(self.question_paper.can_attempt_now(self.user)) + # trying to create an answerpaper with same parameters passed. + answerpaper2 = self.question_paper.make_answerpaper(self.user, self.ip, + attempt_num) + # check if make_answerpaper returned an object instead of creating one. + self.assertEqual(answerpaper, answerpaper2) + + def test_create_trial_paper_to_test_quiz(self): qu_list = [str(self.questions_list[0]), str(self.questions_list[1])] |