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

index 2287f233b4..b406a578f0 100644 --- a/tests/rest/client/test_shadow_banned.py +++ b/tests/rest/client/test_shadow_banned.py
@@ -88,35 +88,6 @@ class RoomTestCase(_ShadowBannedBase): ) self.assertEqual(invited_rooms, []) - def test_invite_3pid(self) -> None: - """Ensure that a 3PID invite does not attempt to contact the identity server.""" - identity_handler = self.hs.get_identity_handler() - identity_handler.lookup_3pid = Mock( # type: ignore[method-assign] - side_effect=AssertionError("This should not get called") - ) - - # The create works fine. - room_id = self.helper.create_room_as( - self.banned_user_id, tok=self.banned_access_token - ) - - # Inviting the user completes successfully. - channel = self.make_request( - "POST", - "/rooms/%s/invite" % (room_id,), - { - "id_server": "test", - "medium": "email", - "address": "test@test.test", - "id_access_token": "anytoken", - }, - access_token=self.banned_access_token, - ) - self.assertEqual(200, channel.code, channel.result) - - # This should have raised an error earlier, but double check this wasn't called. - identity_handler.lookup_3pid.assert_not_called() - def test_create_room(self) -> None: """Invitations during a room creation should be discarded, but the room still gets created.""" # The room creation is successful.