kin: KIN-UI-003 Консистентная обработка ошибок в del() — использовать throwApiError

This commit is contained in:
Gros Frumos 2026-03-16 17:44:49 +02:00
parent fc13245c93
commit 531275e4ce
5 changed files with 112 additions and 35 deletions

View file

@ -1694,4 +1694,23 @@ def test_bootstrap_endpoint_success(bootstrap_client, tmp_path):
assert data["project"]["id"] == "goodproj"
assert "modules_count" in data
assert "decisions_count" in data
def test_delete_project_ok(client):
# Create a separate project to delete
r = client.post("/api/projects", json={"id": "del1", "name": "Del1", "path": "/del1"})
assert r.status_code == 200
r = client.delete("/api/projects/del1")
assert r.status_code == 204
assert r.content == b""
# Verify project is gone
r = client.get("/api/projects/del1")
assert r.status_code == 404
def test_delete_project_not_found(client):
r = client.delete("/api/projects/99999")
assert r.status_code == 404
assert "tasks_count" in data