forked from jazzband/django-waffle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_settings.py
75 lines (59 loc) · 1.56 KB
/
test_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import os
import django
# Make filepaths relative to settings.
ROOT = os.path.dirname(os.path.abspath(__file__))
path = lambda *a: os.path.join(ROOT, *a)
DEBUG = True
TEMPLATE_DEBUG = True
if django.VERSION < (1, 6):
TEST_RUNNER = 'discover_runner.DiscoverRunner'
else:
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
JINJA_CONFIG = {}
SITE_ID = 1
SECRET_KEY = 'foobar'
DATABASES = {
'default': {
'NAME': 'test.db',
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'waffle',
'test_app',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'waffle.middleware.WaffleMiddleware',
)
ROOT_URLCONF = 'test_app.urls'
TEMPLATE_LOADERS = (
'jingo.Loader',
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
JINGO_EXCLUDE_APPS = (
'django',
'waffle',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.request',
)
WAFFLE_FLAG_DEFAULT = False
WAFFLE_SWITCH_DEFAULT = False
WAFFLE_SAMPLE_DEFAULT = False
WAFFLE_OVERRIDE = False
WAFFLE_CACHE_PREFIX = 'test:'
if django.VERSION < (1, 7):
INSTALLED_APPS += ('south', )
SOUTH_MIGRATION_MODULES = {
'waffle': 'waffle.south_migrations'
}