mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 15:35:06 -04:00
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.
This commit is contained in:
parent
44dee1fe8c
commit
7d84d2523a
5 changed files with 35 additions and 26 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue