Debian Codegraph @

tests/settings/sqlite_sentinel.py

raw
1 SECRET_KEY = "django_tests_secret_key"
2
3 DJANGO_REDIS_CONNECTION_FACTORY = "django_redis.pool.SentinelConnectionFactory"
4
5 SENTINELS = [("127.0.0.1", 26379)]
6
7 CACHES = {
8 "default": {
9 "BACKEND": "django_redis.cache.RedisCache",
10 "LOCATION": ["redis://default_service?db=5"],
11 "OPTIONS": {
12 "CLIENT_CLASS": "django_redis.client.DefaultClient",
13 "SENTINELS": SENTINELS,
14 },
15 },
16 "doesnotexist": {
17 "BACKEND": "django_redis.cache.RedisCache",
18 "LOCATION": "redis://missing_service?db=1",
19 "OPTIONS": {
20 "CLIENT_CLASS": "django_redis.client.DefaultClient",
21 "SENTINELS": SENTINELS,
22 },
23 },
24 "sample": {
25 "BACKEND": "django_redis.cache.RedisCache",
26 "LOCATION": "redis://default_service?db=1",
27 "OPTIONS": {
28 "CLIENT_CLASS": "django_redis.client.SentinelClient",
29 "SENTINELS": SENTINELS,
30 },
31 },
32 "with_prefix": {
33 "BACKEND": "django_redis.cache.RedisCache",
34 "LOCATION": "redis://default_service?db=1",
35 "KEY_PREFIX": "test-prefix",
36 "OPTIONS": {
37 "CLIENT_CLASS": "django_redis.client.DefaultClient",
38 "SENTINELS": SENTINELS,
39 },
40 },
41 }
42
43 INSTALLED_APPS = ["django.contrib.sessions"]
44
45 USE_TZ = False