synapse/tests/rest
Sean Quah 78b99de7c2
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: Sean Quah <seanq@element.io>
2022-04-27 14:58:26 +01:00
..
admin Disable groups/communities by default. (#12344) 2022-04-12 10:20:46 -04:00
client Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
key Fix typechecker problems exposed by signedjson 1.1.2 (#12326) 2022-03-29 21:37:50 +00:00
media Ensure the type of URL attributes is always str when matching against preview blacklist (#12333) 2022-03-31 11:49:49 +02:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_health.py Add type hints to tests/rest (#12146) 2022-03-03 16:05:44 +00:00
test_well_known.py Add type hints to tests/rest (#12146) 2022-03-03 16:05:44 +00:00