summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authormahesh2018-02-07 18:49:08 +0530
committermahesh2018-02-07 19:12:48 +0530
commit2c53d636aa4a3f36586910e1d3ef5276a7efc337 (patch)
tree001129b91cce31f3cadcfce6921a7383d9a669b7 /yaksh/test_models.py
parent782fd83b5931efde8ae26795c65e952df5012d0f (diff)
downloadonline_test-2c53d636aa4a3f36586910e1d3ef5276a7efc337.tar.gz
online_test-2c53d636aa4a3f36586910e1d3ef5276a7efc337.tar.bz2
online_test-2c53d636aa4a3f36586910e1d3ef5276a7efc337.zip
Add course as a unique constraint
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index 9166a3e..5db0f27 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -774,7 +774,8 @@ class AnswerPaperTestCases(unittest.TestCase):
question_paper=self.question_paper,
start_time=self.start_time,
end_time=self.end_time,
- user_ip=self.ip
+ user_ip=self.ip,
+ course=self.course
)
self.attempted_papers = AnswerPaper.objects.filter(
question_paper=self.question_paper,
@@ -1321,7 +1322,8 @@ class AnswerPaperTestCases(unittest.TestCase):
question_paper=self.answerpaper.question_paper,
attempt_number=self.answerpaper.attempt_number,
start_time=self.answerpaper.start_time,
- end_time=self.answerpaper.end_time
+ end_time=self.answerpaper.end_time,
+ course=self.answerpaper.course
)