20 lines
540 B
Python
20 lines
540 B
Python
import json
|
|
|
|
TEST_NAME = "teachers:create extra class"
|
|
|
|
|
|
def run(context) -> None:
|
|
payload = {context.K_CLASS_NUMBER: 6, context.K_CLASS_LETTER: "B"}
|
|
status, body, _ = context.send_request(
|
|
"POST",
|
|
"/api/classes",
|
|
body=payload,
|
|
headers=context.make_auth(
|
|
context.teacher_username,
|
|
context.teacher_password,
|
|
),
|
|
)
|
|
context.expect(status == 201, f"expected 201, got {status}")
|
|
data = json.loads(body)
|
|
context.class_two_id = int(data[context.K_IDENTIFIER])
|