summary refs log tree commit diff
path: root/tests/util/test_lrucache.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-22 12:10:33 +0000
committerDavid Baker <dave@matrix.org>2016-01-22 12:10:33 +0000
commit10f76dc5da47c49a4191d8113b3c0615224eb9fd (patch)
tree07d2113ec55cf1a86f1b64b37767c434d8b4eb5c /tests/util/test_lrucache.py
parentAdd __contains__ (diff)
downloadsynapse-10f76dc5da47c49a4191d8113b3c0615224eb9fd.tar.xz
Make LRU cache not default to treecache & add options to use it
Diffstat (limited to '')
-rw-r--r--tests/util/test_lrucache.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/util/test_lrucache.py b/tests/util/test_lrucache.py
index fca2e98983..bcad1d4258 100644
--- a/tests/util/test_lrucache.py
+++ b/tests/util/test_lrucache.py
@@ -17,6 +17,7 @@
 from .. import unittest
 
 from synapse.util.caches.lrucache import LruCache
+from synapse.util.caches.treecache import TreeCache
 
 class LruCacheTestCase(unittest.TestCase):
 
@@ -54,7 +55,7 @@ class LruCacheTestCase(unittest.TestCase):
         self.assertEquals(cache.pop(("key",)), None)
 
     def test_del_multi(self):
-        cache = LruCache(4, 2)
+        cache = LruCache(4, 2, cache_type=TreeCache)
         cache[("animal", "cat")] = "mew"
         cache[("animal", "dog")] = "woof"
         cache[("vehicles", "car")] = "vroom"