summary refs log tree commit diff
path: root/tests/util/test_treecache.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-02-22 15:22:38 +0000
committerMark Haines <mark.haines@matrix.org>2016-02-22 15:22:38 +0000
commit7641a90c34c07621e813b1aa7060114074f2741b (patch)
treecd739eaca0cf219e39538ee8ac2c8aa66717fa22 /tests/util/test_treecache.py
parentTest Filter.filter_rooms (diff)
downloadsynapse-7641a90c34c07621e813b1aa7060114074f2741b.tar.xz
Add a test for TreeCache.__contains__
Diffstat (limited to 'tests/util/test_treecache.py')
-rw-r--r--tests/util/test_treecache.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/util/test_treecache.py b/tests/util/test_treecache.py
index bcc64422b2..7ab578a185 100644
--- a/tests/util/test_treecache.py
+++ b/tests/util/test_treecache.py
@@ -77,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)