summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authoradityacp2021-02-16 15:21:24 +0530
committeradityacp2021-02-16 15:21:24 +0530
commit1a2d31e1c59427c28211030ea09cd4964b4bd8d8 (patch)
treea226037ddb251f65a5841be3652e548e581f416d /yaksh/test_views.py
parentb2bf7b9fef33d59cd1e55776a51577d66a252322 (diff)
downloadonline_test-1a2d31e1c59427c28211030ea09cd4964b4bd8d8.tar.gz
online_test-1a2d31e1c59427c28211030ea09cd4964b4bd8d8.tar.bz2
online_test-1a2d31e1c59427c28211030ea09cd4964b4bd8d8.zip
Change test data files, views, models, template
- Fix upload marks for a quiz column missing error - Add upload marks task to celery - Minor fixes to avoid errors in regrade and custom_filters
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index 58b7506..ccd2fbc 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -23,7 +23,6 @@ from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.files import File
from django.contrib.messages import get_messages
from django.contrib.contenttypes.models import ContentType
-from celery.contrib.testing.worker import start_worker
from django.test import SimpleTestCase
@@ -41,6 +40,8 @@ from online_test.celery_settings import app
from notifications_plugin.models import Notification
+app.conf.update(CELERY_ALWAYS_EAGER=True)
+
class TestUserRegistration(TestCase):
def setUp(self):
@@ -4418,9 +4419,6 @@ class TestGrader(SimpleTestCase):
end_time=timezone.now()+timezone.timedelta(minutes=20),
)
- self.celery_worker = start_worker(app)
- self.celery_worker.__enter__()
-
def tearDown(self):
User.objects.all().delete()
Course.objects.all().delete()
@@ -4429,7 +4427,6 @@ class TestGrader(SimpleTestCase):
QuestionPaper.objects.all().delete()
AnswerPaper.objects.all().delete()
self.mod_group.delete()
- self.celery_worker.__exit__(None, None, None)
def test_regrade_denies_anonymous(self):
# Given