From 67dde2f52f69e9a3834c196135462c93b41649d0 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 10 Sep 2011 17:09:23 +0000 Subject: [PATCH] Fixed #16162. Added timeout arg to `DummyCache.set_many`, for compatiblity with other caches. Thanks to aaugustin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16778 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/cache/backends/dummy.py | 2 +- tests/regressiontests/cache/tests.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/django/core/cache/backends/dummy.py b/django/core/cache/backends/dummy.py index af8b62c8dd..9fe9b3b5f5 100644 --- a/django/core/cache/backends/dummy.py +++ b/django/core/cache/backends/dummy.py @@ -32,7 +32,7 @@ class DummyCache(BaseCache): self.validate_key(key) return False - def set_many(self, data, version=None): + def set_many(self, data, timeout=0, version=None): pass def delete_many(self, keys, version=None): diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py index 2a326ade5d..d3070305cb 100644 --- a/tests/regressiontests/cache/tests.py +++ b/tests/regressiontests/cache/tests.py @@ -147,6 +147,7 @@ class DummyCacheTests(unittest.TestCase): def test_set_many(self): "set_many does nothing for the dummy cache backend" self.cache.set_many({'a': 1, 'b': 2}) + self.cache.set_many({'a': 1, 'b': 2}, timeout=2, version='1') def test_delete_many(self): "delete_many does nothing for the dummy cache backend"