summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests
diff options
context:
space:
mode:
authorankitjavalkar2018-07-11 17:19:56 +0530
committerankitjavalkar2018-07-13 13:00:36 +0530
commite7c18d17c8b5ed193e4e34bdfe2072951d996530 (patch)
treeabe3e154790aab9213ede12336a06f544ddbc79b /yaksh/evaluator_tests
parent69a07a92309105b289f4d08957729bda68727bf2 (diff)
downloadonline_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.tar.gz
online_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.tar.bz2
online_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.zip
Fix tests
Diffstat (limited to 'yaksh/evaluator_tests')
-rw-r--r--yaksh/evaluator_tests/test_simple_question_types.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/evaluator_tests/test_simple_question_types.py b/yaksh/evaluator_tests/test_simple_question_types.py
index f7a6cf6..5edd545 100644
--- a/yaksh/evaluator_tests/test_simple_question_types.py
+++ b/yaksh/evaluator_tests/test_simple_question_types.py
@@ -1,6 +1,7 @@
import unittest
from datetime import datetime, timedelta
from django.utils import timezone
+from django.contrib.auth.models import Group
from textwrap import dedent
import pytz
from yaksh.models import User, Profile, Question, Quiz, QuestionPaper,\
@@ -8,7 +9,9 @@ from yaksh.models import User, Profile, Question, Quiz, QuestionPaper,\
StringTestCase, McqTestCase, ArrangeTestCase
+
def setUpModule():
+ mod_group = Group.objects.create(name='moderator')
# Create user profile
# Create User 1
user = User.objects.create_user(username='demo_user_100',
@@ -46,6 +49,7 @@ def setUpModule():
def tearDownModule():
User.objects.filter(username__in=["demo_user_100", "demo_user_101"])\
.delete()
+ Group.objects.all().delete()
class IntegerQuestionTestCases(unittest.TestCase):