Refs -- Added Added DummyCache.set() test for boolean values.
@@ -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"
