Allowed running the test suite without memcached (!)

This commit is contained in:
Aymeric Augustin 2013-11-23 16:49:14 +01:00
parent 62b393c5ae
commit 1124e16340
1 changed files with 2 additions and 2 deletions

View File

@ -1012,13 +1012,13 @@ class LocMemCacheTests(BaseCacheTests, TestCase):
# To check the memcached backend, the test settings file will
# need to contain at least one cache backend setting that points at
# your memcache server.
memcached_params = None
memcached_params = {}
for _cache_params in settings.CACHES.values():
if _cache_params['BACKEND'].startswith('django.core.cache.backends.memcached.'):
memcached_params = _cache_params
@unittest.skipIf(memcached_params is None, "memcached not available")
@unittest.skipUnless(memcached_params, "memcached not available")
@override_settings(CACHES=caches_setting_for_tests(**memcached_params))
class MemcachedCacheTests(BaseCacheTests, TestCase):