diff options
author | Prabhu Ramachandran | 2017-10-07 10:54:39 +0530 |
---|---|---|
committer | GitHub | 2017-10-07 10:54:39 +0530 |
commit | 39ec0271244826b2693f01f6daaa99525404e15a (patch) | |
tree | 04cf534ac2cdc90f386e051588bf443fc61219ff /yaksh/test_views.py | |
parent | a626f3792d03ccd96a1c49c7096076950d020c5a (diff) | |
parent | 2eb511847777e4e941ed5fc40783086d5e0bdfcc (diff) | |
download | online_test-39ec0271244826b2693f01f6daaa99525404e15a.tar.gz online_test-39ec0271244826b2693f01f6daaa99525404e15a.tar.bz2 online_test-39ec0271244826b2693f01f6daaa99525404e15a.zip |
Merge pull request #343 from adityacp/fix_shuffle_questions
Fix shuffle questions
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 6 |
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)) |