From c7902612ca722f25f6e461c82e6d4d5f0c22f16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= Date: Tue, 14 Dec 2021 06:31:22 +0100 Subject: [PATCH] Refs #33361 -- Added Added DummyCache.set() test for boolean values. --- tests/cache/tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 7a98fc4ba1..a6fbbe6e4b 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -157,17 +157,20 @@ class DummyCacheTests(SimpleTestCase): def test_data_types(self): "All data types are ignored equally by the dummy cache" - stuff = { + tests = { 'string': 'this is a string', 'int': 42, + 'bool': True, 'list': [1, 2, 3, 4], 'tuple': (1, 2, 3, 4), 'dict': {'A': 1, 'B': 2}, 'function': f, 'class': C, } - cache.set("stuff", stuff) - self.assertIsNone(cache.get("stuff")) + for key, value in tests.items(): + with self.subTest(key=key): + cache.set(key, value) + self.assertIsNone(cache.get(key)) def test_expiration(self): "Expiration has no effect on the dummy cache"