forked from jbalogh/django-multidb-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_settings.py
29 lines (24 loc) · 834 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
# A Django settings module to support the tests
SECRET_KEY = 'dummy'
TEST_RUNNER = 'django_nose.runner.NoseTestSuiteRunner'
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware'
)
# The default database should point to the read/write primary.
DATABASES = {
'default': {
'NAME': 'primary.sqlite',
'ENGINE': 'django.db.backends.sqlite3',
},
'replica': {
'NAME': 'replica.sqlite',
'ENGINE': 'django.db.backends.sqlite3',
},
}
# Put the aliases for replica databases in this list.
REPLICA_DATABASES = ['replica']
# If you use PinningReplicaRouter and its associated middleware, you can
# customize the cookie name and its lifetime like so:
# MULTIDB_PINNING_COOKIE = "multidb_pin_writes"
# MULTIDB_PINNING_SECONDS = 15