summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-08-29 14:54:08 +0200
committerClaude Paroz <claude@2xlibre.net>2014-08-30 12:37:10 +0200
commit66757fee7e921ad4c35e0b3f80c25e026100b31c (patch)
tree0b6a6e10a1d800532d114ab4b5b4a2d6f7d73abd /tests/cache
parent05a8cef4288e2a85dbaff12bc2683a75c9998618 (diff)
Fixed #23384 -- Allowed overriding part of a dictionary-type setting
This change is needed for upcoming changes where settings might be grouped in a parent dictionary. Thanks Tim Graham for the review.
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index 4677791fcd..2ee7a6200b 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -522,6 +522,7 @@ class BaseCacheTests(object):
def _perform_cull_test(self, cull_cache, initial_count, final_count):
# Create initial cache key entries. This will overflow the cache,
# causing a cull.
+ cull_cache.clear()
for i in range(1, initial_count):
cull_cache.set('cull%d' % i, 'value', 1000)
count = 0
@@ -918,7 +919,10 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase):
stdout=stdout
)
self.assertEqual(stdout.getvalue(),
- "Cache table 'test cache table' already exists.\n" * len(settings.CACHES))
+ "Cache table 'test cache table' already exists.\n" * len([
+ k for k, v in settings.CACHES.items()
+ if v['BACKEND']=='django.core.cache.backends.db.DatabaseCache'])
+ )
def test_createcachetable_with_table_argument(self):
"""