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
|
"""
Django settings for testing django-nose.
Configuration is overriden by environment variables:
DATABASE_URL - See https://github.com/kennethreitz/dj-database-url
USE_SOUTH - Set to 1 to include South in INSTALLED_APPS
TEST_RUNNER - Dotted path of test runner to use (can also use --test-runner)
NOSE_PLUGINS - Comma-separated list of plugins to add
"""
from __future__ import print_function
from os import environ, path
BASE_DIR = path.dirname(path.dirname(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': path.join(BASE_DIR, 'testapp.sqlite3'),
}
}
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = [
'django_nose',
'testapp',
]
raw_test_runner = environ.get('TEST_RUNNER')
if raw_test_runner:
TEST_RUNNER = raw_test_runner
else:
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
raw_plugins = environ.get('NOSE_PLUGINS')
if raw_plugins:
NOSE_PLUGINS = raw_plugins.split(',')
SECRET_KEY = 'ssshhhh'
|