diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-02-23 18:29:26 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-02-23 18:30:45 +0000 |
commit | f53fcbce9789186c1c42fe2f93ba46e3d8720b1b (patch) | |
tree | 9d6e2f46a79a3cce0ef73b52509f9a2a7865375f /tests | |
parent | Fix code style warning (diff) | |
download | synapse-f53fcbce9789186c1c42fe2f93ba46e3d8720b1b.tar.xz |
Use cache.pop() instead of a separate membership test + del []
Diffstat (limited to '')
-rw-r--r-- | tests/storage/test__base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py index fb306cb784..55d22f665a 100644 --- a/tests/storage/test__base.py +++ b/tests/storage/test__base.py @@ -66,6 +66,13 @@ class CacheDecoratorTestCase(unittest.TestCase): self.assertEquals(callcount[0], 2) + def test_invalidate_missing(self): + @cached() + def func(self, key): + return key + + func.invalidate("what") + @defer.inlineCallbacks def test_max_entries(self): callcount = [0] |