From 0ef1307619799bec2bbb96ce6516f307b0f8f217 Mon Sep 17 00:00:00 2001 From: Jacek KuĊ›nierz Date: Thu, 16 Jun 2022 12:48:18 +0200 Subject: Add custom well-known (#13035) Co-authored-by: David Robertson --- tests/rest/test_well_known.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/rest') 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( -- cgit 1.4.1