diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-01-06 12:28:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-06 12:28:58 +0000 |
commit | 18674eebb1fa5d7445952d7e201afe33bd040523 (patch) | |
tree | 7588b4fbfb7876f3dff01f31d6268f81e3c526d8 /tests/unittest.py | |
parent | Fix power levels being incorrectly set in old and new rooms after a room upgr... (diff) | |
download | synapse-18674eebb1fa5d7445952d7e201afe33bd040523.tar.xz |
Workaround for error when fetching notary's own key (#6620)
* Kill off redundant SynapseRequestFactory We already get the Site via the Channel, so there's no need for a dedicated RequestFactory: we can just use the right constructor. * Workaround for error when fetching notary's own key As a notary server, when we return our own keys, include all of our signing keys in verify_keys. This is a workaround for #6596.
Diffstat (limited to '')
-rw-r--r-- | tests/unittest.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index b30b7d1718..cbda237278 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -36,7 +36,7 @@ from synapse.config.homeserver import HomeServerConfig from synapse.config.ratelimiting import FederationRateLimitConfig from synapse.federation.transport import server as federation_server from synapse.http.server import JsonResource -from synapse.http.site import SynapseRequest +from synapse.http.site import SynapseRequest, SynapseSite from synapse.logging.context import LoggingContext from synapse.server import HomeServer from synapse.types import Requester, UserID, create_requester @@ -210,6 +210,15 @@ class HomeserverTestCase(TestCase): # Register the resources self.resource = self.create_test_json_resource() + # create a site to wrap the resource. + self.site = SynapseSite( + logger_name="synapse.access.http.fake", + site_tag="test", + config={}, + resource=self.resource, + server_version_string="1", + ) + from tests.rest.client.v1.utils import RestHelper self.helper = RestHelper(self.hs, self.resource, getattr(self, "user_id", None)) |