summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-08-28 11:39:45 +0530
committerGitHub2020-08-28 11:39:45 +0530
commit052ac313e9f38e43cf16a3ae1f7f77cc58802529 (patch)
treea5a6bfd8bbdbdb358c8a8912261ab4e7407606c0 /yaksh/test_models.py
parent574e92a8586d4fc900be2c0d8f5114c93e826358 (diff)
parente3c3a0d9f7819f851890ea2611ba12b4f6255f06 (diff)
downloadonline_test-052ac313e9f38e43cf16a3ae1f7f77cc58802529.tar.gz
online_test-052ac313e9f38e43cf16a3ae1f7f77cc58802529.tar.bz2
online_test-052ac313e9f38e43cf16a3ae1f7f77cc58802529.zip
Merge pull request #748 from adityacp/multiple_fixes
Multiple changes
Diffstat (limited to 'yaksh/test_models.py')
-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)