Skip to content
Snippets Groups Projects
Commit edcfd845 authored by Lennard Strohmeyer's avatar Lennard Strohmeyer :penguin:
Browse files

pipeline fix

parent d8f50410
No related branches found
No related tags found
1 merge request!1#155: fixed data disclosure tests for environments where no mongodb is...
Pipeline #1655972 passed
......@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
"""
import mimetypes
import os
import sys
from pathlib import Path
import environ
......@@ -135,11 +136,12 @@ else:
# Cache(s)
# https://docs.djangoproject.com/en/4.1/topics/cache/
use_file_based_cache = 'test' in sys.argv or os.getenv('DJANGO_TEST_ENV') or env("CACHE_BACKEND", default="file") != "redis"
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache' if env("CACHE_BACKEND", default="file") == "redis"
'BACKEND': 'django.core.cache.backends.redis.RedisCache' if not use_file_based_cache
else 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/tmp/django_cache' if env("CACHE_BACKEND", default="file") == 'file' else env("CACHE_URI", default='redis://127.0.0.1:6379') ,
'LOCATION': '/tmp/django_cache' if use_file_based_cache else env("CACHE_URI", default='redis://127.0.0.1:6379') ,
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment