mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-21 09:45:29 +00:00
![Sean Quah](/assets/img/avatar_default.png)
When configuring the return values of mocks, prefer awaitables from `make_awaitable` over `defer.succeed`. `Deferred`s are only awaitable once, so it is inappropriate for a mock to return the same `Deferred` multiple times. Also update `run_in_background` to support functions that return arbitrary awaitables. Signed-off-by: Sean Quah <seanq@element.io>
2 lines
85 B
Plaintext
2 lines
85 B
Plaintext
Use `make_awaitable` instead of `defer.succeed` for return values of mocks in tests.
|