-
Notifications
You must be signed in to change notification settings - Fork 114
/
django_settings.py
31 lines (27 loc) · 967 Bytes
/
django_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
# Minimum settings that are needed to run django test suite
import os
import tempfile
SECRET_KEY = 'WE DONT CARE ABOUT IT'
if "postgresql" in os.getenv("TOX_ENV_NAME", ""):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
# Should be the same defined in .travis.yml
'NAME': 'dirtyfields_test',
# postgres user is by default created in travis-ci
'USER': os.getenv('POSTGRES_USER', 'postgres'),
# postgres user has no password on travis-ci
'PASSWORD': os.getenv('POSTGRES_PASSWORD', ''),
'HOST': 'localhost',
'PORT': '5432', # default postgresql port
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dirtyfields.db',
}
}
INSTALLED_APPS = ('tests', )
MEDIA_ROOT = tempfile.mkdtemp(prefix="django-dirtyfields-test-media-root-")