diff options
author | mcalinghee <mcalinghee.dev@gmail.com> | 2024-04-23 17:45:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 16:45:24 +0100 |
commit | ae181233aa4c296d5d973eedfc599145ac0d5918 (patch) | |
tree | a972be7d6af088d9296af3ba9787dd7d94b6ab8f /tests/rest | |
parent | Add an OSX prompt to manually configure icu4c. (#17069) (diff) | |
download | synapse-ae181233aa4c296d5d973eedfc599145ac0d5918.tar.xz |
Send an email if the address is already bound to an user account (#16819)
Co-authored-by: Mathieu Velten <mathieu.velten@beta.gouv.fr> Co-authored-by: Olivier D <odelcroi@gmail.com>
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/client/test_register.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rest/client/test_register.py b/tests/rest/client/test_register.py index 859051cdda..694f143eff 100644 --- a/tests/rest/client/test_register.py +++ b/tests/rest/client/test_register.py @@ -22,6 +22,7 @@ import datetime import os from typing import Any, Dict, List, Tuple +from unittest.mock import AsyncMock import pkg_resources @@ -42,6 +43,7 @@ from synapse.types import JsonDict from synapse.util import Clock from tests import unittest +from tests.server import ThreadedMemoryReactorClock from tests.unittest import override_config @@ -58,6 +60,13 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase): config["allow_guest_access"] = True return config + def make_homeserver( + self, reactor: ThreadedMemoryReactorClock, clock: Clock + ) -> HomeServer: + hs = super().make_homeserver(reactor, clock) + hs.get_send_email_handler()._sendmail = AsyncMock() + return hs + def test_POST_appservice_registration_valid(self) -> None: user_id = "@as_user_kermit:test" as_token = "i_am_an_app_service" |