diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-10 13:47:45 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-10 13:47:45 +0100 |
commit | 8c3a62b5c75920acbbcdcfd889228160c2a60ef5 (patch) | |
tree | 33d85a573bceaa38e57d9032b0e0570f38afaf40 /tests/storage/test__base.py | |
parent | Merge pull request #212 from matrix-org/erikj/cache_deferreds (diff) | |
parent | Rename keyargs to args in CacheDescriptor (diff) | |
download | synapse-8c3a62b5c75920acbbcdcfd889228160c2a60ef5.tar.xz |
Merge pull request #215 from matrix-org/erikj/cache_varargs_interface
Change Cache to not use *args in its interface
Diffstat (limited to 'tests/storage/test__base.py')
-rw-r--r-- | tests/storage/test__base.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py index 8fa305d18a..abee2f631d 100644 --- a/tests/storage/test__base.py +++ b/tests/storage/test__base.py @@ -42,12 +42,12 @@ class CacheTestCase(unittest.TestCase): self.assertEquals(self.cache.get("foo"), 123) def test_invalidate(self): - self.cache.prefill("foo", 123) - self.cache.invalidate("foo") + self.cache.prefill(("foo",), 123) + self.cache.invalidate(("foo",)) failed = False try: - self.cache.get("foo") + self.cache.get(("foo",)) except KeyError: failed = True @@ -141,7 +141,7 @@ class CacheDecoratorTestCase(unittest.TestCase): self.assertEquals(callcount[0], 1) - a.func.invalidate("foo") + a.func.invalidate(("foo",)) yield a.func("foo") @@ -153,7 +153,7 @@ class CacheDecoratorTestCase(unittest.TestCase): def func(self, key): return key - A().func.invalidate("what") + A().func.invalidate(("what",)) @defer.inlineCallbacks def test_max_entries(self): @@ -193,7 +193,7 @@ class CacheDecoratorTestCase(unittest.TestCase): a = A() - a.func.prefill("foo", ObservableDeferred(d)) + a.func.prefill(("foo",), ObservableDeferred(d)) self.assertEquals(a.func("foo").result, d.result) self.assertEquals(callcount[0], 0) |