chapeau/test_settings.py

73 wiersze
1.6 KiB
Python
Czysty Zwykły widok Historia

2018-08-11 16:21:56 +00:00
from django.urls import path, include
2018-09-23 20:59:13 +00:00
import djcelery
djcelery.setup_loader()
2018-08-19 18:02:11 +00:00
KEPI = {
2019-05-19 21:16:34 +00:00
'ACTIVITY_URL_FORMAT': 'https://altair.example.com/%s',
'LOCAL_OBJECT_HOSTNAME': 'example.com',
2018-08-19 18:02:11 +00:00
}
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
2018-09-23 20:59:13 +00:00
'djcelery',
'django_celery_results',
2018-08-11 16:21:56 +00:00
'django_kepi',
2018-08-12 13:06:26 +00:00
'things_for_testing',
2018-08-11 16:21:56 +00:00
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'kepi_test.sqlite3', # ':memory:',
}
}
SECRET_KEY = "secret_key_for_testing"
2018-08-11 16:21:56 +00:00
ALLOWED_HOSTS = [
'altair.example.com',
'sirius.example.com',
]
2018-08-11 16:21:56 +00:00
ROOT_URLCONF = 'test_urls'
2018-09-23 20:59:13 +00:00
CELERY = {
'task_ignore_result': True,
}
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django_kepi': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner'