summary refs log tree commit diff
path: root/tests/storage/test_registration.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/storage/test_registration.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/storage/test_registration.py b/tests/storage/test_registration.py

index 14e3871dc1..ebad759fd1 100644 --- a/tests/storage/test_registration.py +++ b/tests/storage/test_registration.py
@@ -21,7 +21,6 @@ from twisted.test.proto_helpers import MemoryReactor from synapse.api.constants import UserTypes -from synapse.api.errors import ThreepidValidationError from synapse.server import HomeServer from synapse.types import JsonDict, UserID, UserInfo from synapse.util import Clock @@ -145,39 +144,6 @@ class RegistrationStoreTestCase(HomeserverTestCase): res = self.get_success(self.store.is_support_user(SUPPORT_USER)) self.assertTrue(res) - def test_3pid_inhibit_invalid_validation_session_error(self) -> None: - """Tests that enabling the configuration option to inhibit 3PID errors on - /requestToken also inhibits validation errors caused by an unknown session ID. - """ - - # Check that, with the config setting set to false (the default value), a - # validation error is caused by the unknown session ID. - e = self.get_failure( - self.store.validate_threepid_session( - "fake_sid", - "fake_client_secret", - "fake_token", - 0, - ), - ThreepidValidationError, - ) - self.assertEqual(e.value.msg, "Unknown session_id", e) - - # Set the config setting to true. - self.store._ignore_unknown_session_error = True - - # Check that now the validation error is caused by the token not matching. - e = self.get_failure( - self.store.validate_threepid_session( - "fake_sid", - "fake_client_secret", - "fake_token", - 0, - ), - ThreepidValidationError, - ) - self.assertEqual(e.value.msg, "Validation token not found or has expired", e) - class ApprovalRequiredRegistrationTestCase(HomeserverTestCase): def default_config(self) -> JsonDict: