summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-22 12:18:14 +0000
committerDavid Baker <dave@matrix.org>2016-01-22 12:18:14 +0000
commitd552861346d6f2f3d50fa0aff3e239d17cf9b7c0 (patch)
tree4cd93b237f60276f5a9735c365b5d80c3f1df47e /tests/storage
parentMake LRU cache not default to treecache & add options to use it (diff)
downloadsynapse-d552861346d6f2f3d50fa0aff3e239d17cf9b7c0.tar.xz
Revert all the bits changing keys of eeverything that used LRUCaches to tuples
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test__base.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py
index c4e4c9b4bf..219288621d 100644
--- a/tests/storage/test__base.py
+++ b/tests/storage/test__base.py
@@ -56,42 +56,42 @@ class CacheTestCase(unittest.TestCase):
     def test_eviction(self):
         cache = Cache("test", max_entries=2)
 
-        cache.prefill((1,), "one")
-        cache.prefill((2,), "two")
-        cache.prefill((3,), "three")  # 1 will be evicted
+        cache.prefill(1, "one")
+        cache.prefill(2, "two")
+        cache.prefill(3, "three")  # 1 will be evicted
 
         failed = False
         try:
-            cache.get((1,))
+            cache.get(1)
         except KeyError:
             failed = True
 
         self.assertTrue(failed)
 
-        cache.get((2,))
-        cache.get((3,))
+        cache.get(2)
+        cache.get(3)
 
     def test_eviction_lru(self):
         cache = Cache("test", max_entries=2, lru=True)
 
-        cache.prefill((1,), "one")
-        cache.prefill((2,), "two")
+        cache.prefill(1, "one")
+        cache.prefill(2, "two")
 
         # Now access 1 again, thus causing 2 to be least-recently used
-        cache.get((1,))
+        cache.get(1)
 
-        cache.prefill((3,), "three")
+        cache.prefill(3, "three")
 
         failed = False
         try:
-            cache.get((2,))
+            cache.get(2)
         except KeyError:
             failed = True
 
         self.assertTrue(failed)
 
-        cache.get((1,))
-        cache.get((3,))
+        cache.get(1)
+        cache.get(3)
 
 
 class CacheDecoratorTestCase(unittest.TestCase):