summary refs log tree commit diff
path: root/tests/util
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-19 07:09:07 -0400
committerGitHub <noreply@github.com>2020-08-19 07:09:07 -0400
commitd294f0e7e18f4ba91b5ca6a944758d5b92d1ea2a (patch)
tree2502292d2dba854d3dc781b75e37aa606ceeb40c /tests/util
parentSeparate `get_current_token` into two. (#8113) (diff)
downloadsynapse-d294f0e7e18f4ba91b5ca6a944758d5b92d1ea2a.tar.xz
Remove the unused inlineCallbacks code-paths in the caching code (#8119)
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/caches/test_descriptors.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/util/caches/test_descriptors.py b/tests/util/caches/test_descriptors.py
index 4d2b9e0d64..0363735d4f 100644
--- a/tests/util/caches/test_descriptors.py
+++ b/tests/util/caches/test_descriptors.py
@@ -366,11 +366,11 @@ class CachedListDescriptorTestCase(unittest.TestCase):
             def fn(self, arg1, arg2):
                 pass
 
-            @descriptors.cachedList("fn", "args1", inlineCallbacks=True)
-            def list_fn(self, args1, arg2):
+            @descriptors.cachedList("fn", "args1")
+            async def list_fn(self, args1, arg2):
                 assert current_context().request == "c1"
                 # we want this to behave like an asynchronous function
-                yield run_on_reactor()
+                await run_on_reactor()
                 assert current_context().request == "c1"
                 return self.mock(args1, arg2)
 
@@ -416,10 +416,10 @@ class CachedListDescriptorTestCase(unittest.TestCase):
             def fn(self, arg1, arg2):
                 pass
 
-            @descriptors.cachedList("fn", "args1", inlineCallbacks=True)
-            def list_fn(self, args1, arg2):
+            @descriptors.cachedList("fn", "args1")
+            async def list_fn(self, args1, arg2):
                 # we want this to behave like an asynchronous function
-                yield run_on_reactor()
+                await run_on_reactor()
                 return self.mock(args1, arg2)
 
         obj = Cls()