Skip to content
Snippets Groups Projects
Unverified Commit 78b99de7 authored by Sean Quah's avatar Sean Quah Committed by GitHub
Browse files

Prefer `make_awaitable` over `defer.succeed` in tests (#12505)


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: default avatarSean Quah <seanq@element.io>
parent 5ef673de
No related branches found
No related tags found
No related merge requests found
Showing with 72 additions and 69 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment