diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-13 13:07:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 13:07:12 -0400 |
commit | 01c88a09cd6e90fa28c1282a56a08e481727ce20 (patch) | |
tree | d5875f6291b512163d2e01da2150dd4d0956aa7d /tests/rest | |
parent | Fix copy-paste error in the password section of the sample-config. (#10804) (diff) | |
download | synapse-01c88a09cd6e90fa28c1282a56a08e481727ce20.tar.xz |
Use direct references for some configuration variables (#10798)
Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/test_well_known.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/rest/test_well_known.py b/tests/rest/test_well_known.py index ac0e427752..b2c0279ba0 100644 --- a/tests/rest/test_well_known.py +++ b/tests/rest/test_well_known.py @@ -23,10 +23,13 @@ class WellKnownTests(unittest.HomeserverTestCase): # replace the JsonResource with a WellKnownResource return WellKnownResource(self.hs) + @unittest.override_config( + { + "public_baseurl": "https://tesths", + "default_identity_server": "https://testis", + } + ) def test_well_known(self): - self.hs.config.public_baseurl = "https://tesths" - self.hs.config.default_identity_server = "https://testis" - channel = self.make_request( "GET", "/.well-known/matrix/client", shorthand=False ) @@ -35,14 +38,17 @@ class WellKnownTests(unittest.HomeserverTestCase): self.assertEqual( channel.json_body, { - "m.homeserver": {"base_url": "https://tesths"}, + "m.homeserver": {"base_url": "https://tesths/"}, "m.identity_server": {"base_url": "https://testis"}, }, ) + @unittest.override_config( + { + "public_baseurl": None, + } + ) def test_well_known_no_public_baseurl(self): - self.hs.config.public_baseurl = None - channel = self.make_request( "GET", "/.well-known/matrix/client", shorthand=False ) |