init here

This commit is contained in:
2025-11-26 21:32:41 +03:00
commit 33c97acade
91 changed files with 9155 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
TEST_NAME = "students:create second student"
def run(context) -> None:
payload = {
context.K_FIRST_NAME: "Daisy",
context.K_LAST_NAME: "King",
context.K_MIDDLE_NAME: "May",
context.K_PASSWORD: "Student84",
context.K_CONFIRM_PASSWORD: "Student84",
context.K_SNILS: "99988877766",
context.K_PASSPORT: "CD7654321",
}
status, body, _ = context.send_request(
"POST",
"/api/students",
body=payload,
headers=context.make_auth(
context.teacher_username,
context.teacher_password,
),
)
context.expect(status == 201, f"expected 201, got {status}, body={body!r}")
context.student_two_id = context.query_single_value(
"SELECT id FROM students WHERE snils = ?",
(payload[context.K_SNILS],),
)
context.student_two_username = (
f"{payload[context.K_FIRST_NAME]}.{payload[context.K_LAST_NAME]}"
)
context.student_two_password = payload[context.K_PASSWORD]