summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-05 15:53:10 +0000
committerErik Johnston <erik@matrix.org>2019-12-05 15:57:28 +0000
commit4ca3ef10b9a8d15cf351d67d574088d944c2e3b1 (patch)
treec63740471aca47f9805633ac81a85ebf23e1de07 /tests/utils.py
parentPort rest/v1 to async/await (diff)
downloadsynapse-4ca3ef10b9a8d15cf351d67d574088d944c2e3b1.tar.xz
Fixup tests
Diffstat (limited to '')
-rw-r--r--tests/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py
index de2ac1ed33..c57da59191 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -461,7 +461,9 @@ class MockHttpResource(HttpServer):
                 try:
                     args = [urlparse.unquote(u) for u in matcher.groups()]
 
-                    (code, response) = yield func(mock_request, *args)
+                    (code, response) = yield defer.ensureDeferred(
+                        func(mock_request, *args)
+                    )
                     return code, response
                 except CodeMessageException as e:
                     return (e.code, cs_error(e.msg, code=e.errcode))