root(minor): revert to django_redis cache
This commit is contained in:
parent
dfcfd87644
commit
73558f30d1
|
@ -25,7 +25,8 @@ class TestRecovery(TestCase):
|
||||||
|
|
||||||
def test_recovery_view(self):
|
def test_recovery_view(self):
|
||||||
"""Test recovery view"""
|
"""Test recovery view"""
|
||||||
call_command('create_recovery_key', '1', self.user.username)
|
out = StringIO()
|
||||||
|
call_command('create_recovery_key', '1', self.user.username, stdout=out)
|
||||||
nonce = Nonce.objects.first()
|
nonce = Nonce.objects.first()
|
||||||
self.client.get(reverse('passbook_recovery:use-nonce', kwargs={'uuid': str(nonce.uuid)}))
|
self.client.get(reverse('passbook_recovery:use-nonce', kwargs={'uuid': str(nonce.uuid)}))
|
||||||
self.assertEqual(int(self.client.session['_auth_user_id']), nonce.user.pk)
|
self.assertEqual(int(self.client.session['_auth_user_id']), nonce.user.pk)
|
||||||
|
|
|
@ -137,7 +137,7 @@ REST_FRAMEWORK = {
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "django_prometheus.cache.backends.redis.RedisCache",
|
"BACKEND": "django_redis.cache.RedisCache",
|
||||||
"LOCATION": (f"redis://:{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:6379"
|
"LOCATION": (f"redis://:{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:6379"
|
||||||
f"/{CONFIG.y('redis.cache_db')}"),
|
f"/{CONFIG.y('redis.cache_db')}"),
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
|
|
Reference in New Issue