Refactored test utilities

This commit is contained in:
Raphael Michel
2016-09-26 15:58:14 +02:00
parent 9cc53c19b4
commit 8d70153a39
6 changed files with 37 additions and 25 deletions

View File

@@ -1,31 +1,9 @@
import os
from pretix.testutils.settings import * # NOQA
from pretix.settings import * # NOQA
TEST_DIR = os.path.dirname(__file__)
TEMPLATES[0]['DIRS'].append(os.path.join(TEST_DIR, 'templates')) # NOQA
INSTALLED_APPS.append('tests.testdummy') # NOQA
MEDIA_ROOT = os.path.join(TEST_DIR, 'media')
EMAIL_BACKEND = 'django.core.mail.outbox'
COMPRESS_ENABLED = COMPRESS_OFFLINE = False
PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
# Disable celery
CELERY_ALWAYS_EAGER = True
HAS_CELERY = False
# Don't use redis
SESSION_ENGINE = "django.contrib.sessions.backends.db"
HAS_REDIS = False
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}