synapse/tests/handlers
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
..
__init__.py
oidc_test_key.p8
oidc_test_key.pub.pem
test_admin.py
test_appservice.py Bound ephemeral events by key (#12544) 2022-04-26 20:14:21 +01:00
test_auth.py
test_cas.py
test_deactivate_account.py
test_device.py
test_directory.py
test_e2e_keys.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
test_e2e_room_keys.py
test_federation.py
test_federation_event.py
test_message.py
test_oidc.py
test_password_providers.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
test_presence.py Prevent a sync request from removing a user's busy presence status (#12213) 2022-04-13 16:21:07 +01:00
test_profile.py
test_receipts.py
test_register.py Remove unused # type: ignores (#12531) 2022-04-27 14:03:44 +01:00
test_room.py
test_room_summary.py
test_saml.py
test_send_email.py
test_stats.py
test_sync.py
test_typing.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
test_user_directory.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00