summary refs log tree commit diff
path: root/tests/module_api/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/module_api/test_api.py')
-rw-r--r--tests/module_api/test_api.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/module_api/test_api.py b/tests/module_api/test_api.py

index ccbb82f6a3..9b573ac24d 100644 --- a/tests/module_api/test_api.py +++ b/tests/module_api/test_api.py
@@ -15,7 +15,6 @@ from mock import Mock from synapse.events import EventBase -from synapse.module_api import ModuleApi from synapse.rest import admin from synapse.rest.client.v1 import login, room from synapse.types import create_requester @@ -32,7 +31,7 @@ class ModuleApiTestCase(HomeserverTestCase): def prepare(self, reactor, clock, homeserver): self.store = homeserver.get_datastore() - self.module_api = ModuleApi(homeserver, homeserver.get_auth_handler()) + self.module_api = homeserver.get_module_api() self.event_creation_handler = homeserver.get_event_creation_handler() def test_can_register_user(self): @@ -97,7 +96,10 @@ class ModuleApiTestCase(HomeserverTestCase): # Check that the event was sent self.event_creation_handler.create_and_send_nonmember_event.assert_called_with( - create_requester(user_id), event_dict, ratelimit=False, + create_requester(user_id), + event_dict, + ratelimit=False, + ignore_shadow_ban=True, ) # Create and send a state event @@ -135,6 +137,7 @@ class ModuleApiTestCase(HomeserverTestCase): "state_key": "", }, ratelimit=False, + ignore_shadow_ban=True, ) # Check that we can't send membership events