generated from coulomb/repo-seed
ReviewDecision domain model
This commit is contained in:
@@ -155,6 +155,17 @@ def test_api_analysis_run_loop(tmp_path):
|
||||
)
|
||||
assert reject_response.status_code == 200
|
||||
assert reject_response.json()["abilities"][0]["status"] == "rejected"
|
||||
decisions_response = client.get(f"/repos/{repository_id}/review-decisions")
|
||||
assert decisions_response.status_code == 200
|
||||
assert decisions_response.json()[0]["action"] == "reject_candidate_ability"
|
||||
run_decisions_response = client.get(
|
||||
f"/repos/{repository_id}/analysis-runs/"
|
||||
f"{run['analysis_run']['id']}/review-decisions"
|
||||
)
|
||||
assert run_decisions_response.status_code == 200
|
||||
assert run_decisions_response.json()[0]["notes"] == (
|
||||
"Reject once to exercise review correction."
|
||||
)
|
||||
|
||||
run_response = client.post(f"/repos/{repository_id}/analysis-runs", json={})
|
||||
assert run_response.status_code == 201
|
||||
@@ -302,6 +313,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert run_detail.status_code == 200
|
||||
assert "Candidate Graph" in run_detail.text
|
||||
assert "ID " in run_detail.text
|
||||
assert "No review decisions yet." in run_detail.text
|
||||
|
||||
approve_response = client.post(
|
||||
f"{run_path}/candidate-graph/approve",
|
||||
@@ -316,6 +328,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "Language: Python" in approved_detail.text
|
||||
assert "Framework: FastAPI" in approved_detail.text
|
||||
assert "interface:app.py:3" in approved_detail.text
|
||||
assert "approve_candidate_graph" in approved_detail.text
|
||||
|
||||
search_response = client.get("/ui/search", params={"q": "repository"})
|
||||
assert search_response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user