diff --git a/django_project/core/settings/test_travis.py b/django_project/core/settings/test_travis.py index 63a2b657..afa13082 100644 --- a/django_project/core/settings/test_travis.py +++ b/django_project/core/settings/test_travis.py @@ -12,3 +12,6 @@ 'PORT': '', } } + +# For local testing without celery worker +CELERY_ALWAYS_EAGER = True diff --git a/django_project/realtime/tasks/test/test_flood_task.py b/django_project/realtime/tasks/test/test_flood_task.py index bf2107d6..7eaef635 100644 --- a/django_project/realtime/tasks/test/test_flood_task.py +++ b/django_project/realtime/tasks/test/test_flood_task.py @@ -9,6 +9,7 @@ from django.conf import settings from django.contrib.gis.geos.point import Point from django.core.files.base import File +from django.apps import apps as django_apps from rest_framework.test import APITestCase from core.settings.utils import ABS_PATH @@ -34,6 +35,9 @@ def setUp(self): self.default_media_path = settings.MEDIA_ROOT settings.MEDIA_ROOT = ABS_PATH('media_test') + app_config = django_apps.get_app_config('realtime') + app_config.ready() + Flood.objects.create( event_id=u'2015112518-3-rw', time=datetime.datetime(