0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-24 10:58:52 +01:00

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
This commit is contained in:
Karl Hobley 2014-05-02 11:45:31 +01:00
parent cfcc67f514
commit 360174e230

View File

@ -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
),