mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed #31907 -- Fixed missing validate_key() calls in cache backends.
This commit is contained in:
parent
9e04b242ee
commit
b5acb9db75
3 changed files with 14 additions and 1 deletions
5
tests/cache/tests.py
vendored
5
tests/cache/tests.py
vendored
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue