100% Coverage

This commit is contained in:
Renn F
2026-05-06 21:02:31 +02:00
parent 64c48356d0
commit 9aa30fb945
106 changed files with 28143 additions and 423 deletions
@@ -300,3 +300,35 @@ def test_submit_up_rejects_empty_notes() -> None:
)
assert resp.status_code == _HTTP_422
@pytest.mark.asyncio
async def test_unclaim_dispatches() -> None:
mock_chore = MagicMock()
mock_chore.unclaim = AsyncMock(
return_value=_make_envelope(status="awaiting_pm_review", task_id=_TASK_ID)
)
client = TestClient(_build_app(mock_chore))
resp = client.post(
"/api/v2/flow/cell_pm/unclaim",
json={"task_id": _TASK_ID},
headers=_HEADERS,
)
assert resp.status_code == _HTTP_200
mock_chore.unclaim.assert_awaited_once()
@pytest.mark.asyncio
async def test_resume_dispatches() -> None:
mock_chore = MagicMock()
mock_chore.resume = AsyncMock(
return_value=_make_envelope(status="in_progress", task_id=_TASK_ID)
)
client = TestClient(_build_app(mock_chore))
resp = client.post(
"/api/v2/flow/cell_pm/resume",
json={"task_id": _TASK_ID},
headers=_HEADERS,
)
assert resp.status_code == _HTTP_200
mock_chore.resume.assert_awaited_once()