-
Notifications
You must be signed in to change notification settings - Fork 189
/
test_settings.py
40 lines (34 loc) · 976 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'
SILENCED_SYSTEM_CHECKS = ['django_ratelimit.E003', 'django_ratelimit.W001']
INSTALLED_APPS = (
'django_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.PyMemcacheCache',
'LOCATION': 'test-connection-errors',
},
'connection-errors-redis': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://test-connection-errors',
'OPTIONS': {
'IGNORE_EXCEPTIONS': True,
}
},
'instant-expiration': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
'LOCATION': 'test-instant-expiration',
},
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test.db',
},
}
USE_TZ = True