diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-05-24 08:59:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 12:59:31 +0000 |
commit | 1f55c04cbca6dc56085896dd980defa26ffe3b5b (patch) | |
tree | dcc51ffeee2c83f78379f58165ef8f3f83c915f0 /tests/storage | |
parent | Fix `@trace` not wrapping some state methods that return coroutines correctly... (diff) | |
download | synapse-1f55c04cbca6dc56085896dd980defa26ffe3b5b.tar.xz |
Improve type hints for cached decorator. (#15658)
The cached decorators always return a Deferred, which was not properly propagated. It was close enough when wrapping coroutines, but failed if a bare function was wrapped.
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test_transactions.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/storage/test_transactions.py b/tests/storage/test_transactions.py index db9ee9955e..2fab84a529 100644 --- a/tests/storage/test_transactions.py +++ b/tests/storage/test_transactions.py @@ -33,15 +33,14 @@ class TransactionStoreTestCase(HomeserverTestCase): destination retries, as well as testing tht we can set and get correctly. """ - d = self.store.get_destination_retry_timings("example.com") - r = self.get_success(d) + r = self.get_success(self.store.get_destination_retry_timings("example.com")) self.assertIsNone(r) - d = self.store.set_destination_retry_timings("example.com", 1000, 50, 100) - self.get_success(d) + self.get_success( + self.store.set_destination_retry_timings("example.com", 1000, 50, 100) + ) - d = self.store.get_destination_retry_timings("example.com") - r = self.get_success(d) + r = self.get_success(self.store.get_destination_retry_timings("example.com")) self.assertEqual( DestinationRetryTimings( |