summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
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