Refs #31907 -- Fixed incorrect argument for delete_many() in cache tests.

This commit is contained in:
Nick Pope 2021-08-26 20:19:36 +01:00 committed by Mariusz Felisiak
parent dca4c2ff76
commit b8824e8d17
1 changed files with 3 additions and 3 deletions

View File

@ -213,7 +213,7 @@ class DummyCacheTests(SimpleTestCase):
def test_delete_many_invalid_key(self): def test_delete_many_invalid_key(self):
msg = KEY_ERRORS_WITH_MEMCACHED_MSG % ':1:key with spaces' msg = KEY_ERRORS_WITH_MEMCACHED_MSG % ':1:key with spaces'
with self.assertWarnsMessage(CacheKeyWarning, msg): with self.assertWarnsMessage(CacheKeyWarning, msg):
cache.delete_many({'key with spaces': 'foo'}) cache.delete_many(['key with spaces'])
def test_clear(self): def test_clear(self):
"clear does nothing for the dummy cache backend" "clear does nothing for the dummy cache backend"
@ -700,7 +700,7 @@ class BaseCacheTests:
('delete', [key]), ('delete', [key]),
('get_many', [[key, 'b']]), ('get_many', [[key, 'b']]),
('set_many', [{key: 1, 'b': 2}]), ('set_many', [{key: 1, 'b': 2}]),
('delete_many', [{key: 1, 'b': 2}]), ('delete_many', [[key, 'b']]),
] ]
try: try:
for operation, args in tests: for operation, args in tests:
@ -1409,7 +1409,7 @@ class BaseMemcachedTests(BaseCacheTests):
('delete', [key]), ('delete', [key]),
('get_many', [[key, 'b']]), ('get_many', [[key, 'b']]),
('set_many', [{key: 1, 'b': 2}]), ('set_many', [{key: 1, 'b': 2}]),
('delete_many', [{key: 1, 'b': 2}]), ('delete_many', [[key, 'b']]),
] ]
for operation, args in tests: for operation, args in tests:
with self.subTest(operation=operation): with self.subTest(operation=operation):