Skip to content

Commit

Permalink
Fix celery configuration in travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucernae committed Feb 8, 2017
1 parent 61c34f8 commit 4e821b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_project/core/settings/test_travis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
'PORT': '',
}
}

# For local testing without celery worker
CELERY_ALWAYS_EAGER = True
4 changes: 4 additions & 0 deletions django_project/realtime/tasks/test/test_flood_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 4e821b1

Please sign in to comment.