Retire exercise_status: maturity is the only notion; add CLI tests (RBT-WP-0009-T01)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
parent
b89e8eaa74
commit
6d3414d8b7
29 changed files with 444 additions and 218 deletions
|
|
@ -245,17 +245,11 @@ def test_score_runs_list_and_finalize_flow(srv):
|
|||
assert req(srv, "POST", base + "/finalize", {"_t": t, "outcome": "succeeded", "note": "smooth"})[0] == 303
|
||||
_, _, body = req(srv, "GET", base)
|
||||
assert "Run finished: succeeded" in body and "smooth" in body
|
||||
assert "Record pack as exercised" in body and "would set it to" in body # explicit, with the diff in words
|
||||
assert "Record pack as exercised" not in body and "would set it to" not in body # retired: maturity is derived from runs
|
||||
assert "Start this step" not in body # read-only now
|
||||
_, _, body = req(srv, "GET", "/")
|
||||
assert "succeeded 1" in body
|
||||
# exercised status is only written on the explicit click
|
||||
pack_file = srv.app.packs[i].path
|
||||
assert "exercise_status: unexercised" in pack_file.read_text()
|
||||
assert req(srv, "POST", base + "/exercise", {"_t": t})[0] == 303
|
||||
assert "exercise_status: exercised" in pack_file.read_text()
|
||||
_, _, body = req(srv, "GET", base)
|
||||
assert "Pack recorded as" in body and "Record pack as exercised" not in body
|
||||
assert req(srv, "POST", base + "/exercise", {"_t": t})[0] == 400 # the route is gone
|
||||
|
||||
|
||||
def test_abandon_and_actions_refused_after_finish(srv):
|
||||
|
|
@ -264,7 +258,6 @@ def test_abandon_and_actions_refused_after_finish(srv):
|
|||
assert req(srv, "POST", base + "/finalize", {"_t": t, "outcome": "abandoned"})[0] == 303
|
||||
st, _, body = req(srv, "POST", base + "/read-the-sign/start", {"_t": t})
|
||||
assert st == 400 and "finished" in body
|
||||
assert req(srv, "POST", base + "/exercise", {"_t": t})[0] == 400 # only a succeeded run may exercise the pack
|
||||
|
||||
|
||||
def test_capture_and_pasted_output_check(srv):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue