summary refs log tree commit diff
path: root/tests/util/test_treecache.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/util/test_treecache.py')
-rw-r--r--tests/util/test_treecache.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/util/test_treecache.py b/tests/util/test_treecache.py
index 1efbeb6b33..7ab578a185 100644
--- a/tests/util/test_treecache.py
+++ b/tests/util/test_treecache.py
@@ -18,6 +18,7 @@ from .. import unittest
 
 from synapse.util.caches.treecache import TreeCache
 
+
 class TreeCacheTestCase(unittest.TestCase):
     def test_get_set_onelevel(self):
         cache = TreeCache()
@@ -76,3 +77,9 @@ class TreeCacheTestCase(unittest.TestCase):
         cache[("b",)] = "B"
         cache.clear()
         self.assertEquals(len(cache), 0)
+
+    def test_contains(self):
+        cache = TreeCache()
+        cache[("a",)] = "A"
+        self.assertTrue(("a",) in cache)
+        self.assertFalse(("b",) in cache)