diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-11-16 18:22:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 18:22:24 +0000 |
commit | 3dc1871219f845954a4b7d31fc06739831d67d2e (patch) | |
tree | a54654d07bc289d36fea381102c26e6c63d3e0b5 /tests/replication/test_multi_media_repo.py | |
parent | Move `wait_until_result` into `FakeChannel` (#8758) (diff) | |
parent | fixup test (diff) | |
download | synapse-3dc1871219f845954a4b7d31fc06739831d67d2e.tar.xz |
Merge pull request #8757 from matrix-org/rav/pass_site_to_make_request
Pass a Site into `make_request`
Diffstat (limited to 'tests/replication/test_multi_media_repo.py')
-rw-r--r-- | tests/replication/test_multi_media_repo.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/replication/test_multi_media_repo.py b/tests/replication/test_multi_media_repo.py index 77c261dbf7..a9ac4aeec1 100644 --- a/tests/replication/test_multi_media_repo.py +++ b/tests/replication/test_multi_media_repo.py @@ -28,7 +28,7 @@ from synapse.server import HomeServer from tests.http import TestServerTLSConnectionFactory, get_test_ca_cert_file from tests.replication._base import BaseMultiWorkerStreamTestCase -from tests.server import FakeChannel, FakeTransport +from tests.server import FakeChannel, FakeSite, FakeTransport, make_request logger = logging.getLogger(__name__) @@ -67,14 +67,16 @@ class MediaRepoShardTestCase(BaseMultiWorkerStreamTestCase): The channel for the *client* request and the *outbound* request for the media which the caller should respond to. """ - - request, channel = self.make_request( + resource = hs.get_media_repository_resource().children[b"download"] + request, channel = make_request( + self.reactor, + FakeSite(resource), "GET", "/{}/{}".format(target, media_id), shorthand=False, access_token=self.access_token, ) - request.render(hs.get_media_repository_resource().children[b"download"]) + request.render(resource) self.pump() clients = self.reactor.tcpClients |