summary refs log tree commit diff
path: root/tests/handlers/test_user_directory.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-16 15:46:03 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-16 15:46:03 +0100
commit59766708cf9eb42b6d63f139d919db326591f4df (patch)
treecf7a3475691b4a89ac551a0c304b5ab0d127f151 /tests/handlers/test_user_directory.py
parentMerge commit 'bd30cfe86' into anoa/dinsic_release_1_31_0 (diff)
downloadsynapse-59766708cf9eb42b6d63f139d919db326591f4df.tar.xz
Fix old-style uses of self.make_request in dinum test code
Diffstat (limited to 'tests/handlers/test_user_directory.py')
-rw-r--r--tests/handlers/test_user_directory.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/handlers/test_user_directory.py b/tests/handlers/test_user_directory.py

index dc433e1487..9a49e7983e 100644 --- a/tests/handlers/test_user_directory.py +++ b/tests/handlers/test_user_directory.py
@@ -672,7 +672,7 @@ class UserInfoTestCase(unittest.FederatingHomeserverTestCase): user_one, user_two, user_three, user_three_token = self.setup_test_users() # Request info about each user from user_three - request, channel = self.make_request( + channel = self.make_request( "POST", path="/_matrix/client/unstable/users/info", content={"user_ids": [user_one, user_two, user_three]}, @@ -703,7 +703,7 @@ class UserInfoTestCase(unittest.FederatingHomeserverTestCase): user_one, user_two, user_three, user_three_token = self.setup_test_users() # Request information about our local users from the perspective of a remote server - request, channel = self.make_request( + channel = self.make_request( "POST", path="/_matrix/federation/unstable/users/info", content={"user_ids": [user_one, user_two, user_three]}, @@ -756,9 +756,7 @@ class UserInfoTestCase(unittest.FederatingHomeserverTestCase): "expiration_ts": 0, "enable_renewal_emails": False, } - request, channel = self.make_request( - "POST", url, request_data, access_token=admin_tok - ) + channel = self.make_request("POST", url, request_data, access_token=admin_tok) self.assertEquals(channel.result["code"], b"200", channel.result) def deactivate(self, user_id, tok): @@ -766,7 +764,7 @@ class UserInfoTestCase(unittest.FederatingHomeserverTestCase): "auth": {"type": "m.login.password", "user": user_id, "password": "pass"}, "erase": False, } - request, channel = self.make_request( + channel = self.make_request( "POST", "account/deactivate", request_data, access_token=tok ) - self.assertEqual(request.code, 200) + self.assertEqual(channel.code, 200)