summary refs log tree commit diff
path: root/tests/rest/client/test_account.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2022-07-17 23:28:45 +0200
committerGitHub <noreply@github.com>2022-07-17 22:28:45 +0100
commitefee345b454ac5e6aeb4b4128793be1fbc308b91 (patch)
treef7e49ed0f8f3f3c65a01e60c79434cbc1b617cb2 /tests/rest/client/test_account.py
parentMake all `process_replication_rows` methods async (#13304) (diff)
downloadsynapse-efee345b454ac5e6aeb4b4128793be1fbc308b91.tar.xz
Remove unnecessary `json.dumps` from tests (#13303)
Diffstat (limited to 'tests/rest/client/test_account.py')
-rw-r--r--tests/rest/client/test_account.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/tests/rest/client/test_account.py b/tests/rest/client/test_account.py
index 6d6a26b8f4..7ae926dc9c 100644
--- a/tests/rest/client/test_account.py
+++ b/tests/rest/client/test_account.py
@@ -11,7 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-import json
 import os
 import re
 from email.parser import Parser
@@ -96,9 +95,7 @@ class PasswordResetTestCase(unittest.HomeserverTestCase):
         """
         body = {"type": "m.login.password", "user": username, "password": password}
 
-        channel = self.make_request(
-            "POST", "/_matrix/client/r0/login", json.dumps(body).encode("utf8")
-        )
+        channel = self.make_request("POST", "/_matrix/client/r0/login", body)
         self.assertEqual(channel.code, HTTPStatus.FORBIDDEN, channel.result)
 
     def test_basic_password_reset(self) -> None:
@@ -480,16 +477,14 @@ class DeactivateTestCase(unittest.HomeserverTestCase):
         self.assertEqual(memberships[0].room_id, room_id, memberships)
 
     def deactivate(self, user_id: str, tok: str) -> None:
-        request_data = json.dumps(
-            {
-                "auth": {
-                    "type": "m.login.password",
-                    "user": user_id,
-                    "password": "test",
-                },
-                "erase": False,
-            }
-        )
+        request_data = {
+            "auth": {
+                "type": "m.login.password",
+                "user": user_id,
+                "password": "test",
+            },
+            "erase": False,
+        }
         channel = self.make_request(
             "POST", "account/deactivate", request_data, access_token=tok
         )