diff options
author | adityacp | 2017-03-08 15:31:03 +0530 |
---|---|---|
committer | adityacp | 2017-03-10 15:41:07 +0530 |
commit | ca3c488193a7321b0ed0986856c4e74feadc199c (patch) | |
tree | a24478e4953c4acf1d37db088b8143ff0a52226a /yaksh/test_views.py | |
parent | b8d6116cd59f68888aca8f2acceecc9b85ebf7de (diff) | |
download | online_test-ca3c488193a7321b0ed0986856c4e74feadc199c.tar.gz online_test-ca3c488193a7321b0ed0986856c4e74feadc199c.tar.bz2 online_test-ca3c488193a7321b0ed0986856c4e74feadc199c.zip |
Change views and models
- Remove Fixed Question Model
- Create a fixed question order attribute in models
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 9d74697..aa6561a 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, FixedQuestions + StdIOBasedTestCase, has_profile class TestProfile(TestCase): @@ -1161,8 +1161,7 @@ class TestViewAnswerPaper(TestCase): self.question_paper = QuestionPaper.objects.create(quiz=self.quiz, total_marks=1.0) - fixed_ques = FixedQuestions() - fixed_ques.add_fixed_questions(self.question_paper, self.question) + self.question_paper.fixed_questions.add(self.question) self.question_paper.save() AnswerPaper.objects.create(user_id=3, @@ -1446,8 +1445,7 @@ class TestGrader(TestCase): self.question_paper = QuestionPaper.objects.create(quiz=self.quiz, total_marks=1.0) - fixed_ques = FixedQuestions() - fixed_ques.add_fixed_questions(self.question_paper, self.question) + self.question_paper.fixed_questions.add(self.question) self.question_paper.save() self.answerpaper = AnswerPaper.objects.create(user_id=3, |