mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:06:01 -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
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue