28 lines
726 B
Python
28 lines
726 B
Python
TEST_NAME = "teachers:delete extra class"
|
|
|
|
|
|
def run(context) -> None:
|
|
path = f"/api/classes/{context.class_two_id}"
|
|
status, _, _ = context.send_request(
|
|
"DELETE",
|
|
path,
|
|
headers=context.make_auth(
|
|
context.teacher_username,
|
|
context.teacher_password,
|
|
),
|
|
)
|
|
context.expect(status == 204, f"expected 204, got {status}")
|
|
status, _, _ = context.send_request(
|
|
"DELETE",
|
|
path,
|
|
headers=context.make_auth(
|
|
context.teacher_username,
|
|
context.teacher_password,
|
|
),
|
|
)
|
|
context.expect(
|
|
status == 404,
|
|
f"expected 404 on repeated delete, got {status}",
|
|
)
|
|
context.class_two_id = None
|