diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-08-19 16:52:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 16:52:20 +0100 |
commit | 40e3e68cd7c4ab6bf6d7ae228bacfb0c8ff6fa38 (patch) | |
tree | 4499de4d0a947016e0ec257b529b6743782e4d62 /tests/handlers | |
parent | Reduce the number of tests using TCP replication. (#13543) (diff) | |
download | synapse-40e3e68cd7c4ab6bf6d7ae228bacfb0c8ff6fa38.tar.xz |
Register homeserver modules when creating test homeserver (#13558)
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_password_providers.py | 11 | ||||
-rw-r--r-- | tests/handlers/test_register.py | 7 |
2 files changed, 0 insertions, 18 deletions
diff --git a/tests/handlers/test_password_providers.py b/tests/handlers/test_password_providers.py index 4c62449c89..75934b1707 100644 --- a/tests/handlers/test_password_providers.py +++ b/tests/handlers/test_password_providers.py @@ -21,7 +21,6 @@ from unittest.mock import Mock import synapse from synapse.api.constants import LoginType from synapse.api.errors import Codes -from synapse.handlers.auth import load_legacy_password_auth_providers from synapse.module_api import ModuleApi from synapse.rest.client import account, devices, login, logout, register from synapse.types import JsonDict, UserID @@ -167,16 +166,6 @@ class PasswordAuthProviderTests(unittest.HomeserverTestCase): mock_password_provider.reset_mock() super().setUp() - def make_homeserver(self, reactor, clock): - hs = self.setup_test_homeserver() - # Load the modules into the homeserver - module_api = hs.get_module_api() - for module, config in hs.config.modules.loaded_modules: - module(config=config, api=module_api) - load_legacy_password_auth_providers(hs) - - return hs - @override_config(legacy_providers_config(LegacyPasswordOnlyAuthProvider)) def test_password_only_auth_progiver_login_legacy(self): self.password_only_auth_provider_login_test_body() diff --git a/tests/handlers/test_register.py b/tests/handlers/test_register.py index 23f35d5bf5..86b3d51975 100644 --- a/tests/handlers/test_register.py +++ b/tests/handlers/test_register.py @@ -22,7 +22,6 @@ from synapse.api.errors import ( ResourceLimitError, SynapseError, ) -from synapse.events.spamcheck import load_legacy_spam_checkers from synapse.spam_checker_api import RegistrationBehaviour from synapse.types import RoomAlias, RoomID, UserID, create_requester @@ -144,12 +143,6 @@ class RegistrationTestCase(unittest.HomeserverTestCase): config=hs_config, federation_client=self.mock_federation_client ) - load_legacy_spam_checkers(hs) - - module_api = hs.get_module_api() - for module, config in hs.config.modules.loaded_modules: - module(config=config, api=module_api) - return hs def prepare(self, reactor, clock, hs): |