forked from django-compressor/django-compressor
/
test_settings.py
39 lines (31 loc) · 910 Bytes
/
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
import os
import django
TEST_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tests')
COMPRESS_CACHE_BACKEND = 'locmem://'
if django.VERSION[:2] > (1, 3):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
else:
DATABASE_ENGINE = 'sqlite3'
INSTALLED_APPS = [
'compressor',
'django_jenkins',
]
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(TEST_DIR, 'media')
TEMPLATE_DIRS = (
# Specifically choose a name that will not be considered
# by app_directories loader, to make sure each test uses
# a specific template without considering the others.
os.path.join(TEST_DIR, 'test_templates'),
)
JENKINS_TASKS = (
'django_jenkins.tasks.run_pyflakes',
'django_jenkins.tasks.run_pep8',
'django_jenkins.tasks.with_coverage',
'django_jenkins.tasks.django_tests',
)