summary refs log tree commit diff
path: root/tests/rest/client/test_reporting.py
diff options
context:
space:
mode:
authorTravis Ralston <travisr@element.io>2024-10-31 03:55:30 -0600
committerGitHub <noreply@github.com>2024-10-31 09:55:30 +0000
commitc705beebf7e95f25624ec38280192d96bc207626 (patch)
tree81b701f302216824f13385ac47c82edfbd02ce1b /tests/rest/client/test_reporting.py
parentRemove `Generator` in `_prune_old_outbound_device_pokes` (#17814) (diff)
downloadsynapse-c705beebf7e95f25624ec38280192d96bc207626.tar.xz
Support & use stable endpoints for MSC4151 (#17374)
https://github.com/matrix-org/matrix-spec-proposals/pull/4151 has
finished FCP.

See https://github.com/element-hq/synapse/issues/17373 for unstable
endpoint removal

---------

Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
Diffstat (limited to 'tests/rest/client/test_reporting.py')
-rw-r--r--tests/rest/client/test_reporting.py31
1 files changed, 2 insertions, 29 deletions
diff --git a/tests/rest/client/test_reporting.py b/tests/rest/client/test_reporting.py

index 009deb9cb0..723553979f 100644 --- a/tests/rest/client/test_reporting.py +++ b/tests/rest/client/test_reporting.py
@@ -156,58 +156,31 @@ class ReportRoomTestCase(unittest.HomeserverTestCase): self.room_id = self.helper.create_room_as( self.other_user, tok=self.other_user_tok, is_public=True ) - self.report_path = ( - f"/_matrix/client/unstable/org.matrix.msc4151/rooms/{self.room_id}/report" - ) + self.report_path = f"/_matrix/client/v3/rooms/{self.room_id}/report" - @unittest.override_config( - { - "experimental_features": {"msc4151_enabled": True}, - } - ) def test_reason_str(self) -> None: data = {"reason": "this makes me sad"} self._assert_status(200, data) - @unittest.override_config( - { - "experimental_features": {"msc4151_enabled": True}, - } - ) def test_no_reason(self) -> None: data = {"not_reason": "for typechecking"} self._assert_status(400, data) - @unittest.override_config( - { - "experimental_features": {"msc4151_enabled": True}, - } - ) def test_reason_nonstring(self) -> None: data = {"reason": 42} self._assert_status(400, data) - @unittest.override_config( - { - "experimental_features": {"msc4151_enabled": True}, - } - ) def test_reason_null(self) -> None: data = {"reason": None} self._assert_status(400, data) - @unittest.override_config( - { - "experimental_features": {"msc4151_enabled": True}, - } - ) def test_cannot_report_nonexistent_room(self) -> None: """ Tests that we don't accept event reports for rooms which do not exist. """ channel = self.make_request( "POST", - "/_matrix/client/unstable/org.matrix.msc4151/rooms/!bloop:example.org/report", + "/_matrix/client/v3/rooms/!bloop:example.org/report", {"reason": "i am very sad"}, access_token=self.other_user_tok, shorthand=False,