Add test for gnuviechadmin.celery
This commit adds a refactoring for gnuviechadmin.celery to make the installed apps detection testable. The test is added in gnuviechadmin.tests.test_celery. Debug code in gnuviechadmin.urls is no excluded from coverage reporting.
This commit is contained in:
parent
7bcb0d3100
commit
be0531ec30
3 changed files with 15 additions and 2 deletions
|
@ -12,5 +12,8 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE',
|
|||
|
||||
app = Celery('gnuviechadmin')
|
||||
|
||||
def get_installed_apps():
|
||||
return settings.INSTALLED_APPS
|
||||
|
||||
app.config_from_object('django.conf:settings')
|
||||
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
|
||||
app.autodiscover_tasks(get_installed_apps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue