synapse-old/tests/rest/client
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 Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_account.py Move single-use methods out of `TestCase` (#12348) 2022-04-01 12:48:08 +00:00
test_account_data.py Add a module callback to react to account data changes (#12327) 2022-04-01 11:22:48 +02:00
test_auth.py Add type hints to `tests/rest/client` (#12066) 2022-02-23 08:33:19 -05:00
test_capabilities.py Add type hints to `tests/rest/client` (#12066) 2022-02-23 08:33:19 -05:00
test_consent.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_device_lists.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_directory.py Test room alias deletion (#11327) 2021-11-12 19:56:00 +00:00
test_ephemeral_message.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_events.py Add type hints to `tests/rest/client` (#12094) 2022-02-28 18:59:00 +00:00
test_filter.py Add type hints to `tests/rest/client` (#12108) 2022-03-02 16:34:14 +00:00
test_groups.py Add type hints to `tests/rest/client` (#12094) 2022-02-28 18:59:00 +00:00
test_identity.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_keys.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_login.py Limit `device_id` size to 512B (#12454) 2022-04-13 10:04:01 -07:00
test_mutual_rooms.py Rename shared_rooms to mutual_rooms (#12036) 2022-03-23 11:19:20 +00:00
test_password_policy.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_power_levels.py Add type hints to `tests/rest/client` (#12072) 2022-02-24 13:56:38 -05:00
test_presence.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00
test_profile.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
test_push_rule_attrs.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
test_redactions.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
test_register.py Add type hints to `tests/rest/client` (#12094) 2022-02-28 18:59:00 +00:00
test_relations.py Misc. clean-ups to the relations code (#12519) 2022-04-25 08:25:56 -04:00
test_report_event.py Add type hints to `tests/rest/client` (#12108) 2022-03-02 16:34:14 +00:00
test_retention.py Retention test: avoid relying on state at purged events (#12202) 2022-03-11 10:33:49 +00:00
test_room_batch.py Fix missing sync events during historical batch imports (#12319) 2022-04-13 11:38:35 +01:00
test_rooms.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00
test_sendtodevice.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
test_shadow_banned.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
test_sync.py Move MSC2654 support behind an experimental configuration flag. (#12295) 2022-03-31 15:05:13 -04:00
test_third_party_rules.py Add a callback to react to 3PID associations (#12302) 2022-03-31 18:27:21 +02:00
test_transactions.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00
test_typing.py Remove unused mocks from `test_typing` (#12136) 2022-03-02 17:24:52 +00:00
test_upgrade_room.py Add type hints to `tests/rest/client` (#12084) 2022-02-28 17:47:37 +00:00
utils.py Default to `private` room visibility rather than `public` when a client does not specify one, according to spec. (#12350) 2022-04-01 15:55:09 +01:00