diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-12-08 11:37:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 11:37:05 -0500 |
commit | 9d8a3234ba1d3ff831a7647f45c67946773d88a7 (patch) | |
tree | 256c2459353b973ccd217bf2282433932a500a97 /tests/rest/client | |
parent | Check the stream position before checking if the cache is empty. (#14639) (diff) | |
download | synapse-9d8a3234ba1d3ff831a7647f45c67946773d88a7.tar.xz |
Respond with proper error responses on unknown paths. (#14621)
Returns a proper 404 with an errcode of M_RECOGNIZED for unknown endpoints per MSC3743.
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/test_login_token_request.py | 4 | ||||
-rw-r--r-- | tests/rest/client/test_rendezvous.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/rest/client/test_login_token_request.py b/tests/rest/client/test_login_token_request.py index c2e1e08811..6aedc1a11c 100644 --- a/tests/rest/client/test_login_token_request.py +++ b/tests/rest/client/test_login_token_request.py @@ -48,13 +48,13 @@ class LoginTokenRequestServletTestCase(unittest.HomeserverTestCase): def test_disabled(self) -> None: channel = self.make_request("POST", endpoint, {}, access_token=None) - self.assertEqual(channel.code, 400) + self.assertEqual(channel.code, 404) self.register_user(self.user, self.password) token = self.login(self.user, self.password) channel = self.make_request("POST", endpoint, {}, access_token=token) - self.assertEqual(channel.code, 400) + self.assertEqual(channel.code, 404) @override_config({"experimental_features": {"msc3882_enabled": True}}) def test_require_auth(self) -> None: diff --git a/tests/rest/client/test_rendezvous.py b/tests/rest/client/test_rendezvous.py index ad00a476e1..c0eb5d01a6 100644 --- a/tests/rest/client/test_rendezvous.py +++ b/tests/rest/client/test_rendezvous.py @@ -36,7 +36,7 @@ class RendezvousServletTestCase(unittest.HomeserverTestCase): def test_disabled(self) -> None: channel = self.make_request("POST", endpoint, {}, access_token=None) - self.assertEqual(channel.code, 400) + self.assertEqual(channel.code, 404) @override_config({"experimental_features": {"msc3886_endpoint": "/asd"}}) def test_redirect(self) -> None: |