diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-30 11:03:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 11:03:29 -0400 |
commit | 7d84d2523a02ce90badb6bdee5ffc182170a57fe (patch) | |
tree | 821b717ecb42e1d8e0c231657022ef69212a58ce /tests/module_api/test_api.py | |
parent | Merge tag 'v1.44.0rc2' into develop (diff) | |
download | synapse-7d84d2523a02ce90badb6bdee5ffc182170a57fe.tar.xz |
Fix errors in Synapse logs from unit tests. (#10939)
Fix some harmless errors from background processes (mostly due to awaiting Mock objects) that occurred in the Synapse logs during unit tests.
Diffstat (limited to 'tests/module_api/test_api.py')
-rw-r--r-- | tests/module_api/test_api.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/module_api/test_api.py b/tests/module_api/test_api.py index 9d38974fba..e915dd5c7c 100644 --- a/tests/module_api/test_api.py +++ b/tests/module_api/test_api.py @@ -25,6 +25,7 @@ from synapse.types import create_requester from tests.events.test_presence_router import send_presence_update, sync_presence from tests.replication._base import BaseMultiWorkerStreamTestCase +from tests.test_utils import simple_async_mock from tests.test_utils.event_injection import inject_member_event from tests.unittest import HomeserverTestCase, override_config from tests.utils import USE_POSTGRES_FOR_TESTS @@ -46,8 +47,12 @@ class ModuleApiTestCase(HomeserverTestCase): self.auth_handler = homeserver.get_auth_handler() def make_homeserver(self, reactor, clock): + # Mock out the calls over federation. + fed_transport_client = Mock(spec=["send_transaction"]) + fed_transport_client.send_transaction = simple_async_mock({}) + return self.setup_test_homeserver( - federation_transport_client=Mock(spec=["send_transaction"]), + federation_transport_client=fed_transport_client, ) def test_can_register_user(self): |