From 02b0bddf9c2a3877ddcf18e6041d7a46c269e859 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Sun, 22 Jun 2025 15:50:04 +0300 Subject: [PATCH] redis-cache is needed for Django5 https://forum.djangoproject.com/t/redis-cache-in-django-5-0/27131 --- setup.py | 1 + tests/test_values.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fa61273..f262b0e 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ setup( 'search': ['dj-search-url'], 'testing': [ 'django-cache-url>=1.0.0', + 'django-redis', 'dj-database-url', 'dj-email-url', 'dj-search-url', diff --git a/tests/test_values.py b/tests/test_values.py index 841635f..dbc621b 100644 --- a/tests/test_values.py +++ b/tests/test_values.py @@ -439,7 +439,7 @@ class ValueTests(TestCase): def test_cache_url_value(self): cache_setting = { 'default': { - 'BACKEND': 'django_redis.cache.RedisCache' if DJANGO_VERSION < (4,) else 'django.core.cache.backends.redis.RedisCache', # noqa: E501 + 'BACKEND': 'django_redis.cache.RedisCache' if DJANGO_VERSION < (4,) or DJANGO_VERSION > (5,) else 'django.core.cache.backends.redis.RedisCache', # noqa: E501 'LOCATION': 'redis://host:6379/1', } }