summary refs log tree commit diff
path: root/tests/rest/client/v1
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-11-15 22:49:21 +0000
committerRichard van der Hoff <richard@matrix.org>2020-11-16 18:24:08 +0000
commitbe8fa65d0baddcc0a64954e21d38a854e4ee00d7 (patch)
treeaada7d9ac2dac6555cf0cc4513b605d0edab5d5d /tests/rest/client/v1
parentMake `make_request` actually render the request (diff)
downloadsynapse-be8fa65d0baddcc0a64954e21d38a854e4ee00d7.tar.xz
Remove redundant calls to `render()`
Diffstat (limited to 'tests/rest/client/v1')
-rw-r--r--tests/rest/client/v1/utils.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/rest/client/v1/utils.py b/tests/rest/client/v1/utils.py
index 040a92d6f0..b58768675b 100644
--- a/tests/rest/client/v1/utils.py
+++ b/tests/rest/client/v1/utils.py
@@ -27,7 +27,7 @@ from twisted.web.server import Site
 
 from synapse.api.constants import Membership
 
-from tests.server import FakeSite, make_request, render
+from tests.server import FakeSite, make_request
 
 
 @attr.s
@@ -52,14 +52,13 @@ class RestHelper:
         if tok:
             path = path + "?access_token=%s" % tok
 
-        request, channel = make_request(
+        _, channel = make_request(
             self.hs.get_reactor(),
             self.site,
             "POST",
             path,
             json.dumps(content).encode("utf8"),
         )
-        render(request, self.site.resource, self.hs.get_reactor())
 
         assert channel.result["code"] == b"%d" % expect_code, channel.result
         self.auth_user_id = temp_id
@@ -129,7 +128,7 @@ class RestHelper:
         data = {"membership": membership}
         data.update(extra_data)
 
-        request, channel = make_request(
+        _, channel = make_request(
             self.hs.get_reactor(),
             self.site,
             "PUT",
@@ -137,8 +136,6 @@ class RestHelper:
             json.dumps(data).encode("utf8"),
         )
 
-        render(request, self.site.resource, self.hs.get_reactor())
-
         assert int(channel.result["code"]) == expect_code, (
             "Expected: %d, got: %d, resp: %r"
             % (expect_code, int(channel.result["code"]), channel.result["body"])
@@ -166,14 +163,13 @@ class RestHelper:
         if tok:
             path = path + "?access_token=%s" % tok
 
-        request, channel = make_request(
+        _, channel = make_request(
             self.hs.get_reactor(),
             self.site,
             "PUT",
             path,
             json.dumps(content).encode("utf8"),
         )
-        render(request, self.site.resource, self.hs.get_reactor())
 
         assert int(channel.result["code"]) == expect_code, (
             "Expected: %d, got: %d, resp: %r"
@@ -223,12 +219,10 @@ class RestHelper:
         if body is not None:
             content = json.dumps(body).encode("utf8")
 
-        request, channel = make_request(
+        _, channel = make_request(
             self.hs.get_reactor(), self.site, method, path, content
         )
 
-        render(request, self.site.resource, self.hs.get_reactor())
-
         assert int(channel.result["code"]) == expect_code, (
             "Expected: %d, got: %d, resp: %r"
             % (expect_code, int(channel.result["code"]), channel.result["body"])