init here
This commit is contained in:
16
autotest/cases/case_05_users_change_password.py
Normal file
16
autotest/cases/case_05_users_change_password.py
Normal file
@@ -0,0 +1,16 @@
|
||||
TEST_NAME = "users:change password"
|
||||
|
||||
|
||||
def run(context) -> None:
|
||||
payload = {context.K_NEW_PASSWORD: context.teacher_password_new}
|
||||
status, body, _ = context.send_request(
|
||||
"PUT",
|
||||
"/api/users/password",
|
||||
body=payload,
|
||||
headers=context.make_auth(
|
||||
context.teacher_username,
|
||||
context.teacher_password,
|
||||
),
|
||||
)
|
||||
context.expect(status == 204, f"expected 204, got {status}, body={body!r}")
|
||||
context.teacher_password = context.teacher_password_new
|
||||
Reference in New Issue
Block a user