File: settings.py

package info (click to toggle)
django-nose 1.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 408 kB
  • sloc: python: 918; makefile: 207; sh: 160
file content (40 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (3)
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'