diff options
author | Erik Johnston <erik@matrix.org> | 2020-01-20 17:23:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 17:23:59 +0000 |
commit | ceecedc68ba1af25b0ee60c5cf927fd1fd245b9f (patch) | |
tree | 485516ca1afdc48271e2b102a9ece8b376d9754f /tests/rest/admin/test_user.py | |
parent | Fix empty account_validity config block (#6747) (diff) | |
download | synapse-ceecedc68ba1af25b0ee60c5cf927fd1fd245b9f.tar.xz |
Fix changing password via user admin API. (#6730)
Diffstat (limited to 'tests/rest/admin/test_user.py')
-rw-r--r-- | tests/rest/admin/test_user.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rest/admin/test_user.py b/tests/rest/admin/test_user.py index 7352d609e6..8f09f51c61 100644 --- a/tests/rest/admin/test_user.py +++ b/tests/rest/admin/test_user.py @@ -435,6 +435,19 @@ class UserRestTestCase(unittest.HomeserverTestCase): self.assertEqual(0, channel.json_body["is_guest"]) self.assertEqual(0, channel.json_body["deactivated"]) + # Change password + body = json.dumps({"password": "hahaha"}) + + request, channel = self.make_request( + "PUT", + self.url, + access_token=self.admin_user_tok, + content=body.encode(encoding="utf_8"), + ) + self.render(request) + + self.assertEqual(200, int(channel.result["code"]), msg=channel.result["body"]) + # Modify user body = json.dumps({"displayname": "foobar", "deactivated": True}) |