forked from jsocol/django-ratelimit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_settings.py
40 lines (35 loc) · 987 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
40
SECRET_KEY = 'ratelimit'
INSTALLED_APPS = (
'ratelimit',
)
RATELIMIT_USE_CACHE = 'default'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'ratelimit-tests',
},
'connection-errors': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'test-connection-errors',
},
'connection-errors-redis': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'test-connection-errors',
'OPTIONS': {
'IGNORE_EXCEPTIONS': True,
}
},
'instant-expiration': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'test-instant-expiration',
'TIMEOUT': 0,
},
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test.db',
},
}
# silence system check about unset `MIDDLEWARE_CLASSES`
SILENCED_SYSTEM_CHECKS = ['1_7.W001']