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
pull/225/head
Karl Hobley 2014-05-02 11:45:31 +01:00
rodzic cfcc67f514
commit 360174e230
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

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