mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #26460 -- Issued a single warning for invalid cache key
This commit is contained in:
committed by
Simon Charette
parent
15a20dc9af
commit
d356bb653f
2
tests/cache/tests.py
vendored
2
tests/cache/tests.py
vendored
@@ -586,7 +586,7 @@ class BaseCacheTests(object):
|
||||
warnings.simplefilter("always")
|
||||
# memcached does not allow whitespace or control characters in keys
|
||||
cache.set('key with spaces', 'value')
|
||||
self.assertEqual(len(w), 2)
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertIsInstance(w[0].message, CacheKeyWarning)
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
|
||||
Reference in New Issue
Block a user