diff options
author | Jacek KuĊnierz <jacek.kusnierz@tum.de> | 2022-06-16 12:48:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 11:48:18 +0100 |
commit | 0ef1307619799bec2bbb96ce6516f307b0f8f217 (patch) | |
tree | dfbaaad6bfb22e0244733df8e538bcc6b8d5d660 /tests | |
parent | Add instructions for running Complement with `gotestfmt`-formatted output loc... (diff) | |
download | synapse-0ef1307619799bec2bbb96ce6516f307b0f8f217.tar.xz |
Add custom well-known (#13035)
Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rest/test_well_known.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rest/test_well_known.py b/tests/rest/test_well_known.py index 11f78f52b8..d8faafec75 100644 --- a/tests/rest/test_well_known.py +++ b/tests/rest/test_well_known.py @@ -59,6 +59,28 @@ class WellKnownTests(unittest.HomeserverTestCase): self.assertEqual(channel.code, HTTPStatus.NOT_FOUND) + @unittest.override_config( + { + "public_baseurl": "https://tesths", + "default_identity_server": "https://testis", + "extra_well_known_client_content": {"custom": False}, + } + ) + def test_client_well_known_custom(self) -> None: + channel = self.make_request( + "GET", "/.well-known/matrix/client", shorthand=False + ) + + self.assertEqual(channel.code, HTTPStatus.OK) + self.assertEqual( + channel.json_body, + { + "m.homeserver": {"base_url": "https://tesths/"}, + "m.identity_server": {"base_url": "https://testis"}, + "custom": False, + }, + ) + @unittest.override_config({"serve_server_wellknown": True}) def test_server_well_known(self) -> None: channel = self.make_request( |