diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2021-12-14 06:31:22 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-14 06:47:37 +0100 |
| commit | c7902612ca722f25f6e461c82e6d4d5f0c22f16a (patch) | |
| tree | 1bc0e0c4d697ec647d65a3c9acf3ea66515ede30 | |
| parent | 41329b9852fcae586bd20aa9f3e591dde94cc925 (diff) | |
Refs #33361 -- Added Added DummyCache.set() test for boolean values.
| -rw-r--r-- | tests/cache/tests.py | 9 |
1 files 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" |
