mirror of https://github.com/django/django.git
[3.1.x] Refs CVE-2020-13254 -- Fixed cache.tests when KEY_PREFIX is defined.
Follow up to2c82414914
. Backport of229c9c6653
from master
This commit is contained in:
parent
616c49d08e
commit
2265bbe7b5
|
@ -1275,7 +1275,7 @@ class BaseMemcachedTests(BaseCacheTests):
|
|||
Whilst other backends merely warn, memcached should raise for an
|
||||
invalid key.
|
||||
"""
|
||||
msg = expected_warning.replace(key, ':1:%s' % key)
|
||||
msg = expected_warning.replace(key, cache.make_key(key))
|
||||
with self.assertRaisesMessage(InvalidCacheKey, msg):
|
||||
cache.set(key, 'value')
|
||||
|
||||
|
|
Loading…
Reference in New Issue