summary refs log tree commit diff
path: root/tests/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-17 15:26:47 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-17 15:26:47 +0100
commit2f5dfe299cbbeb34ed686c9ee1ab14ded13f368c (patch)
tree6b91ad3e6a2b0f002e1d4f26fe229c5a5736d541 /tests/server.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge pull request #3546 from matrix-org/rav/fix_erasure_over_federation (diff)
downloadsynapse-2f5dfe299cbbeb34ed686c9ee1ab14ded13f368c.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'tests/server.py')
-rw-r--r--tests/server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/server.py b/tests/server.py

index e93f5a7f94..c611dd6059 100644 --- a/tests/server.py +++ b/tests/server.py
@@ -80,6 +80,11 @@ def make_request(method, path, content=b""): content, and return the Request and the Channel underneath. """ + # Decorate it to be the full path + if not path.startswith(b"/_matrix"): + path = b"/_matrix/client/r0/" + path + path = path.replace("//", "/") + if isinstance(content, text_type): content = content.encode('utf8') @@ -110,6 +115,11 @@ def wait_until_result(clock, channel, timeout=100): clock.advance(0.1) +def render(request, resource, clock): + request.render(resource) + wait_until_result(clock, request._channel) + + class ThreadedMemoryReactorClock(MemoryReactorClock): """ A MemoryReactorClock that supports callFromThread.