mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 10:44:51 -04:00
Remove the unused inlineCallbacks code-paths in the caching code (#8119)
This commit is contained in:
parent
76d21d14a0
commit
d294f0e7e1
3 changed files with 15 additions and 52 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue