summary refs log tree commit diff
path: root/tests/events
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-30 11:03:29 -0400
committerGitHub <noreply@github.com>2021-09-30 11:03:29 -0400
commit7d84d2523a02ce90badb6bdee5ffc182170a57fe (patch)
tree821b717ecb42e1d8e0c231657022ef69212a58ce /tests/events
parentMerge tag 'v1.44.0rc2' into develop (diff)
downloadsynapse-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/events')
-rw-r--r--tests/events/test_presence_router.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/events/test_presence_router.py b/tests/events/test_presence_router.py
index 3b3866bff8..3deb14c308 100644
--- a/tests/events/test_presence_router.py
+++ b/tests/events/test_presence_router.py
@@ -26,6 +26,7 @@ from synapse.rest.client import login, presence, room
 from synapse.types import JsonDict, StreamToken, create_requester
 
 from tests.handlers.test_sync import generate_sync_config
+from tests.test_utils import simple_async_mock
 from tests.unittest import FederatingHomeserverTestCase, TestCase, override_config
 
 
@@ -133,8 +134,12 @@ class PresenceRouterTestCase(FederatingHomeserverTestCase):
     ]
 
     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({})
+
         hs = self.setup_test_homeserver(
-            federation_transport_client=Mock(spec=["send_transaction"]),
+            federation_transport_client=fed_transport_client,
         )
         # Load the modules into the homeserver
         module_api = hs.get_module_api()