diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-01-07 15:07:19 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-01-07 15:07:19 +0000 |
commit | 4be582d7c85b45d14d0320330b98c9251b3a95ed (patch) | |
tree | 8d09864ce61b48fe5c4e44a6016713f239d667da /tests/server.py | |
parent | Apply suggestions from code review (diff) | |
parent | Fixup changelog (diff) | |
download | synapse-4be582d7c85b45d14d0320330b98c9251b3a95ed.tar.xz |
Merge branch 'develop' into babolivier/retention_doc
Diffstat (limited to 'tests/server.py')
-rw-r--r-- | tests/server.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/server.py b/tests/server.py index a554dfdd57..1644710aa0 100644 --- a/tests/server.py +++ b/tests/server.py @@ -20,6 +20,7 @@ from twisted.python.failure import Failure from twisted.test.proto_helpers import AccumulatingProtocol, MemoryReactorClock from twisted.web.http import unquote from twisted.web.http_headers import Headers +from twisted.web.server import Site from synapse.http.site import SynapseRequest from synapse.util import Clock @@ -42,6 +43,7 @@ class FakeChannel(object): wire). """ + site = attr.ib(type=Site) _reactor = attr.ib() result = attr.ib(default=attr.Factory(dict)) _producer = None @@ -176,9 +178,9 @@ def make_request( content = content.encode("utf8") site = FakeSite() - channel = FakeChannel(reactor) + channel = FakeChannel(site, reactor) - req = request(site, channel) + req = request(channel) req.process = lambda: b"" req.content = BytesIO(content) req.postpath = list(map(unquote, path[1:].split(b"/"))) |