File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
django_prometheus/tests/end2end/testapp Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 12
12
13
13
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14
14
import os
15
-
15
+ import tempfile
16
16
import django
17
17
18
18
BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
@@ -128,6 +128,7 @@ def GetMiddlewareClasses():
128
128
}
129
129
130
130
# Caches
131
+ _tmp_cache_dir = tempfile .mkdtemp ()
131
132
132
133
CACHES = {
133
134
"default" : {
@@ -140,11 +141,11 @@ def GetMiddlewareClasses():
140
141
},
141
142
"filebased" : {
142
143
"BACKEND" : "django_prometheus.cache.backends.filebased.FileBasedCache" ,
143
- "LOCATION" : "/var/tmp/ django_cache" ,
144
+ "LOCATION" : os . path . join ( _tmp_cache_dir , " django_cache") ,
144
145
},
145
146
"locmem" : {
146
147
"BACKEND" : "django_prometheus.cache.backends.locmem.LocMemCache" ,
147
- "LOCATION" : "/var/tmp/ locmem_cache" ,
148
+ "LOCATION" : os . path . join ( _tmp_cache_dir , " locmem_cache") ,
148
149
},
149
150
"redis" : {
150
151
"BACKEND" : "django_prometheus.cache.backends.redis.RedisCache" ,
You can’t perform that action at this time.
0 commit comments