Files
srab/autotest/cases/case_05_users_change_password.py
2025-11-26 21:32:41 +03:00

17 lines
513 B
Python

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