mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 04:44:52 -04:00
Fix changing password via user admin API. (#6730)
This commit is contained in:
parent
e9e066055f
commit
ceecedc68b
3 changed files with 16 additions and 2 deletions
|
@ -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})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue