diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-10-14 19:43:37 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-10-14 23:38:14 +0100 |
commit | 9f87da0a84f93096e228f01f1139c9b5db8ea3d4 (patch) | |
tree | 7e7537fc724023611f94727b9b93791862aaf3b7 /tests/storage | |
parent | Add some more type annotations to Cache (diff) | |
download | synapse-9f87da0a84f93096e228f01f1139c9b5db8ea3d4.tar.xz |
Rename Cache->DeferredCache
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test__base.py | 10 |
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") |