summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorJacek KuĊ›nierz <jacek.kusnierz@tum.de>2022-06-16 12:48:18 +0200
committerGitHub <noreply@github.com>2022-06-16 11:48:18 +0100
commit0ef1307619799bec2bbb96ce6516f307b0f8f217 (patch)
treedfbaaad6bfb22e0244733df8e538bcc6b8d5d660 /tests/rest
parentAdd instructions for running Complement with `gotestfmt`-formatted output loc... (diff)
downloadsynapse-0ef1307619799bec2bbb96ce6516f307b0f8f217.tar.xz
Add custom well-known (#13035)
Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/test_well_known.py22
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(