From 360174e2301de8f49cd611fa90f478f0ab2413aa Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Fri, 2 May 2014 11:45:31 +0100 Subject: [PATCH] Use database cache for testing Currently, the cache is not flushed between tests. This can cause false positives where a previous test has been messing with cache keys which a future test uses (eg, wagtail_root_paths) This commit makes django use the database as the cache which is automatically flushed between tests --- runtests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtests.py b/runtests.py index dec9bfb12c..956251436d 100755 --- a/runtests.py +++ b/runtests.py @@ -82,6 +82,12 @@ if not settings.configured: 'wagtail.wagtailredirects', 'wagtail.tests', ], + CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', + 'LOCATION': 'cache', + } + }, PASSWORD_HASHERS=( 'django.contrib.auth.hashers.MD5PasswordHasher', # don't use the intentionally slow default password hasher ),