diff --git a/django/core/cache/backends/dummy.py b/django/core/cache/backends/dummy.py index d1aea0a325..7957df8072 100644 --- a/django/core/cache/backends/dummy.py +++ b/django/core/cache/backends/dummy.py @@ -34,7 +34,7 @@ class DummyCache(BaseCache): return False def set_many(self, data, timeout=DEFAULT_TIMEOUT, version=None): - pass + return [] def delete_many(self, keys, version=None): pass diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 9a903ef203..5cee2d84a5 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -173,8 +173,8 @@ class DummyCacheTests(SimpleTestCase): def test_set_many(self): "set_many does nothing for the dummy cache backend" - cache.set_many({'a': 1, 'b': 2}) - cache.set_many({'a': 1, 'b': 2}, timeout=2, version='1') + self.assertEqual(cache.set_many({'a': 1, 'b': 2}), []) + self.assertEqual(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"