init here
This commit is contained in:
19
autotest/cases/case_10_teachers_create_extra_class.py
Normal file
19
autotest/cases/case_10_teachers_create_extra_class.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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])
|
||||
Reference in New Issue
Block a user