diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-11-15 22:47:54 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-11-16 18:24:00 +0000 |
commit | 129ae841e5aebb34a980dd7d118140d08b0ff81d (patch) | |
tree | 8b8208ce08d4e6aec002ef02e926ce71bc3ec97c /tests/rest/client | |
parent | Fix the URL in the URL preview tests (diff) | |
download | synapse-129ae841e5aebb34a980dd7d118140d08b0ff81d.tar.xz |
Make `make_request` actually render the request
remove the stubbing out of `request.process`, so that `requestReceived` also renders the request via the appropriate resource. Replace render() with a stub for now.
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/v1/utils.py | 4 | ||||
-rw-r--r-- | tests/rest/client/v2_alpha/test_account.py | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/tests/rest/client/v1/utils.py b/tests/rest/client/v1/utils.py index 900852f85b..040a92d6f0 100644 --- a/tests/rest/client/v1/utils.py +++ b/tests/rest/client/v1/utils.py @@ -310,7 +310,7 @@ class RestHelper: """ image_length = len(image_data) path = "/_matrix/media/r0/upload?filename=%s" % (filename,) - request, channel = make_request( + _, channel = make_request( self.hs.get_reactor(), FakeSite(resource), "POST", @@ -319,8 +319,6 @@ class RestHelper: access_token=tok, custom_headers=[(b"Content-Length", str(image_length))], ) - request.render(resource) - self.hs.get_reactor().pump([100]) assert channel.code == expect_code, "Expected: %d, got: %d, resp: %r" % ( expect_code, diff --git a/tests/rest/client/v2_alpha/test_account.py b/tests/rest/client/v2_alpha/test_account.py index 94a627b0a6..b871200909 100644 --- a/tests/rest/client/v2_alpha/test_account.py +++ b/tests/rest/client/v2_alpha/test_account.py @@ -263,8 +263,6 @@ class PasswordResetTestCase(unittest.HomeserverTestCase): path, shorthand=False, ) - request.render(self.submit_token_resource) - self.pump() self.assertEquals(200, channel.code, channel.result) @@ -288,8 +286,6 @@ class PasswordResetTestCase(unittest.HomeserverTestCase): shorthand=False, content_is_form=True, ) - request.render(self.submit_token_resource) - self.pump() self.assertEquals(200, channel.code, channel.result) def _get_link_from_email(self): |