summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-10-14 19:43:37 +0100
committerRichard van der Hoff <richard@matrix.org>2020-10-14 23:38:14 +0100
commit9f87da0a84f93096e228f01f1139c9b5db8ea3d4 (patch)
tree7e7537fc724023611f94727b9b93791862aaf3b7 /tests/storage
parentAdd some more type annotations to Cache (diff)
downloadsynapse-9f87da0a84f93096e228f01f1139c9b5db8ea3d4.tar.xz
Rename Cache->DeferredCache
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test__base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py
index f5afed017c..00adcab7b9 100644
--- a/tests/storage/test__base.py
+++ b/tests/storage/test__base.py
@@ -20,14 +20,14 @@ from mock import Mock
 from twisted.internet import defer
 
 from synapse.util.async_helpers import ObservableDeferred
-from synapse.util.caches.descriptors import Cache, cached
+from synapse.util.caches.descriptors import DeferredCache, cached
 
 from tests import unittest
 
 
-class CacheTestCase(unittest.HomeserverTestCase):
+class DeferredCacheTestCase(unittest.HomeserverTestCase):
     def prepare(self, reactor, clock, homeserver):
-        self.cache = Cache("test")
+        self.cache = DeferredCache("test")
 
     def test_empty(self):
         failed = False
@@ -56,7 +56,7 @@ class CacheTestCase(unittest.HomeserverTestCase):
         self.assertTrue(failed)
 
     def test_eviction(self):
-        cache = Cache("test", max_entries=2)
+        cache = DeferredCache("test", max_entries=2)
 
         cache.prefill(1, "one")
         cache.prefill(2, "two")
@@ -74,7 +74,7 @@ class CacheTestCase(unittest.HomeserverTestCase):
         cache.get(3)
 
     def test_eviction_lru(self):
-        cache = Cache("test", max_entries=2)
+        cache = DeferredCache("test", max_entries=2)
 
         cache.prefill(1, "one")
         cache.prefill(2, "two")