Skip to content

Commit

Permalink
[chores] Added celery configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Nov 23, 2023
1 parent 020467e commit 88cb080
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
3 changes: 3 additions & 0 deletions tests/openwisp2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .celery import app as celery_app

__all__ = ['celery_app']
9 changes: 9 additions & 0 deletions tests/openwisp2/celery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os

from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openwisp2.settings')

app = Celery('openwisp2')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
6 changes: 6 additions & 0 deletions tests/openwisp2/sample_users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ class Migration(migrations.Migration):
max_length=8,
),
),
(
'password_updated',
models.DateField(
blank=True, null=True, verbose_name="password updated"
),
),
],
options={
'verbose_name': 'user',
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions tests/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
OPENWISP_USERS_AUTH_API = True

CELERY_BROKER_URL = 'memory://'

if TESTING:
OPENWISP_ORGANIZATION_USER_ADMIN = True
OPENWISP_ORGANIZATION_OWNER_ADMIN = True
Expand Down

0 comments on commit 88cb080

Please sign in to comment.