root(minor): revert to django_redis cache

This commit is contained in:
Langhammer, Jens 2019-11-08 13:56:09 +01:00
parent dfcfd87644
commit 73558f30d1
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@ class TestRecovery(TestCase):
def test_recovery_view(self):
"""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()
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)

View File

@ -137,7 +137,7 @@ REST_FRAMEWORK = {
CACHES = {
"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"
f"/{CONFIG.y('redis.cache_db')}"),
"OPTIONS": {