diff options
author | Erik Johnston <erik@matrix.org> | 2019-03-04 11:54:58 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-03-04 11:54:58 +0000 |
commit | fbc047f2a5f12ee934e5ccbe7274100aa72166b5 (patch) | |
tree | 2eabc4f13032883ff61fc635d0be43292a5ad131 /tests/unittest.py | |
parent | Update newsfile to have a full stop (diff) | |
parent | Update test_typing to use HomeserverTestCase. (#4771) (diff) | |
download | synapse-fbc047f2a5f12ee934e5ccbe7274100aa72166b5.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/stop_fed_not_in_room
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index fac254ff10..ef31321bc8 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -262,6 +262,7 @@ class HomeserverTestCase(TestCase): access_token=None, request=SynapseRequest, shorthand=True, + federation_auth_origin=None, ): """ Create a SynapseRequest at the path using the method and containing the @@ -275,15 +276,18 @@ class HomeserverTestCase(TestCase): a dict. shorthand: Whether to try and be helpful and prefix the given URL with the usual REST API path, if it doesn't contain it. + federation_auth_origin (bytes|None): if set to not-None, we will add a fake + Authorization header pretenting to be the given server name. Returns: - A synapse.http.site.SynapseRequest. + Tuple[synapse.http.site.SynapseRequest, channel] """ if isinstance(content, dict): content = json.dumps(content).encode('utf8') return make_request( - self.reactor, method, path, content, access_token, request, shorthand + self.reactor, method, path, content, access_token, request, shorthand, + federation_auth_origin, ) def render(self, request): |