summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authoradityacp2017-10-06 18:01:25 +0530
committeradityacp2017-10-06 18:01:25 +0530
commitbf17148a234b77a4a4521d34e17afddb3cd34914 (patch)
tree5787e2fd829637fa167861011896317d833a79a1 /yaksh/test_views.py
parent9c6472c4a677248bc0f2de2a513368dc68d11f05 (diff)
downloadonline_test-bf17148a234b77a4a4521d34e17afddb3cd34914.tar.gz
online_test-bf17148a234b77a4a4521d34e17afddb3cd34914.tar.bz2
online_test-bf17148a234b77a4a4521d34e17afddb3cd34914.zip
Add test for shuffle questions and fix broken tests in test_views
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index 2d86b77..dc06126 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -2092,13 +2092,13 @@ class TestViewAnswerPaper(TestCase):
self.quiz = Quiz.objects.create(time_between_attempts=0, course=self.course,
description='demo quiz', language='Python')
-
+ self.user3 = User.objects.get(username="demo_user3")
self.question_paper = QuestionPaper.objects.create(quiz=self.quiz,
total_marks=1.0)
self.question_paper.fixed_questions.add(self.question)
self.question_paper.save()
- self.ans_paper = AnswerPaper.objects.create(user_id=3,
+ self.ans_paper = AnswerPaper.objects.create(user=self.user3,
attempt_number=1, question_paper=self.question_paper,
start_time=timezone.now(), user_ip='101.0.0.1',
end_time=timezone.now()+timezone.timedelta(minutes=20))
@@ -2382,7 +2382,7 @@ class TestGrader(TestCase):
self.question_paper.fixed_questions.add(self.question)
self.question_paper.save()
- self.answerpaper = AnswerPaper.objects.create(user_id=3,
+ self.answerpaper = AnswerPaper.objects.create(user=self.user2,
attempt_number=1, question_paper=self.question_paper,
start_time=timezone.now(), user_ip='101.0.0.1',
end_time=timezone.now()+timezone.timedelta(minutes=20))