def test_set(self): no_cache = NoCache() no_cache.set('foo', 'bar') no_cache.set('moof', 'baz', timeout=1) # Use the underlying cache system to verify. self.assertEqual(cache.get('foo'), None) self.assertEqual(cache.get('moof'), None)