1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #31907 -- Fixed missing validate_key() calls in cache backends.

This commit is contained in:
Nick Pope
2020-08-19 14:05:05 +01:00
committed by Mariusz Felisiak
parent 9e04b242ee
commit b5acb9db75
3 changed files with 14 additions and 1 deletions

View File

@@ -656,6 +656,7 @@ class BaseCacheTests:
('set', [key, 1]),
('incr', [key]),
('decr', [key]),
('touch', [key]),
('delete', [key]),
('get_many', [[key, 'b']]),
('set_many', [{key: 1, 'b': 2}]),
@@ -1306,11 +1307,15 @@ class BaseMemcachedTests(BaseCacheTests):
msg = expected_warning.replace(key, cache.make_key(key))
tests = [
('add', [key, 1]),
('get', [key]),
('set', [key, 1]),
('incr', [key]),
('decr', [key]),
('touch', [key]),
('delete', [key]),
('get_many', [[key, 'b']]),
('set_many', [{key: 1, 'b': 2}]),
('delete_many', [{key: 1, 'b': 2}]),
]
for operation, args in tests:
with self.subTest(operation=operation):