This commit is contained in:
team3
2026-07-27 11:29:57 +02:00
parent 15ad6dfe8a
commit 1c8a4fd4fd
30 changed files with 1133 additions and 173 deletions

View File

@@ -58,6 +58,17 @@ async def test_feature_crud(client):
assert (await client.delete("/api/projekte/Alpha/features/login")).status_code == 404
async def test_pruefung_ohne_konfiguration(client, monkeypatch):
import agents
monkeypatch.setattr(agents.config, "MINIMAX_API_KEY", "")
await client.post("/api/projekte", json={"name": "Alpha"})
res = await client.post("/api/projekte/Alpha/pruefung")
# 400, nicht 409 — 409 heißt „läuft bereits" und würde die Meldung verschlucken
assert res.status_code == 400
assert "MINIMAX_API_KEY" in res.json()["detail"]
async def test_unbekanntes_projekt(client):
assert (await client.get("/api/projekte/Fremd/features")).status_code == 404
assert (await client.post("/api/projekte/Fremd/features", json={"roh": ROH})).status_code == 404