summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2020-08-28 09:11:23 +0530
committeradityacp2020-08-28 10:45:01 +0530
commitebe75b31c225eaa71d6963b8ac493e37a63efb50 (patch)
tree819f41609000dadfbd5774afc15f073b31eda059
parentc77f0ca5616faa4e9426d610e38da1b6231346dc (diff)
downloadonline_test-ebe75b31c225eaa71d6963b8ac493e37a63efb50.tar.gz
online_test-ebe75b31c225eaa71d6963b8ac493e37a63efb50.tar.bz2
online_test-ebe75b31c225eaa71d6963b8ac493e37a63efb50.zip
fix tests
-rw-r--r--yaksh/test_models.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index 37baf6e..a77c8bf 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -27,7 +27,7 @@ from yaksh import settings
def setUpModule():
- Group.objects.create(name='moderator')
+ Group.objects.get_or_create(name='moderator')
# create user profile
user = User.objects.create_user(username='creator',
@@ -842,7 +842,11 @@ class QuestionPaperTestCases(unittest.TestCase):
total_marks=0.0,
shuffle_questions=True
)
-
+ self.question_paper_with_time_between_attempts.fixed_question_order = \
+ "{0}, {1}".format(self.questions[3].id, self.questions[5].id)
+ self.question_paper_with_time_between_attempts.fixed_questions.add(
+ self.questions[3], self.questions[5]
+ )
self.question_paper.fixed_question_order = "{0}, {1}".format(
self.questions[3].id, self.questions[5].id
)
@@ -1030,7 +1034,7 @@ class QuestionPaperTestCases(unittest.TestCase):
qu_list = [str(self.questions_list[0]), str(self.questions_list[1])]
trial_paper = \
QuestionPaper.objects.create_trial_paper_to_test_quiz(
- self.trial_quiz, self.quiz.id
+ self.trial_quiz, self.quiz_with_time_between_attempts.id
)
trial_paper.random_questions.add(self.question_set_1)
trial_paper.random_questions.add(self.question_set_2)