summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authoradityacp2017-02-22 15:01:24 +0530
committeradityacp2017-03-10 15:41:07 +0530
commitb8d6116cd59f68888aca8f2acceecc9b85ebf7de (patch)
treee174a3e4a9c6927c15b01183cb95075d60eea963 /yaksh/test_views.py
parentc2ffb981b81410006a04b43997a2441a99dbff3d (diff)
downloadonline_test-b8d6116cd59f68888aca8f2acceecc9b85ebf7de.tar.gz
online_test-b8d6116cd59f68888aca8f2acceecc9b85ebf7de.tar.bz2
online_test-b8d6116cd59f68888aca8f2acceecc9b85ebf7de.zip
Change models and views test to get fixed questions
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index 7757f70..9d74697 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -10,7 +10,7 @@ from django.utils import timezone
from yaksh.models import User, Profile, Question, Quiz, QuestionPaper,\
QuestionSet, AnswerPaper, Answer, Course, StandardTestCase,\
- StdIOBasedTestCase, has_profile
+ StdIOBasedTestCase, has_profile, FixedQuestions
class TestProfile(TestCase):
@@ -1161,8 +1161,8 @@ class TestViewAnswerPaper(TestCase):
self.question_paper = QuestionPaper.objects.create(quiz=self.quiz,
total_marks=1.0)
-
- self.question_paper.fixed_questions.add(self.question)
+ fixed_ques = FixedQuestions()
+ fixed_ques.add_fixed_questions(self.question_paper, self.question)
self.question_paper.save()
AnswerPaper.objects.create(user_id=3,
@@ -1446,8 +1446,8 @@ class TestGrader(TestCase):
self.question_paper = QuestionPaper.objects.create(quiz=self.quiz,
total_marks=1.0)
-
- self.question_paper.fixed_questions.add(self.question)
+ fixed_ques = FixedQuestions()
+ fixed_ques.add_fixed_questions(self.question_paper, self.question)
self.question_paper.save()
self.answerpaper = AnswerPaper.objects.create(user_id=3,