update
This commit is contained in:
@@ -70,6 +70,12 @@ def test_loeschen(projekt):
|
||||
assert features.liste(projekt) == []
|
||||
|
||||
|
||||
def test_speichern_ohne_titel(projekt):
|
||||
f = features.anlegen(projekt, "<!-- titel -->\nDa\n")
|
||||
with pytest.raises(ValueError):
|
||||
features.speichern(projekt, f["id"], "<!-- ziel -->\nohne Titel\n")
|
||||
|
||||
|
||||
def test_unbekannte_id(projekt):
|
||||
with pytest.raises(FileNotFoundError):
|
||||
features.speichern(projekt, "gibts-nicht", "x")
|
||||
|
||||
@@ -43,6 +43,10 @@ async def test_feature_crud(client):
|
||||
res = await client.post("/api/projekte/Alpha/features", json={"roh": "kein Titel"})
|
||||
assert res.status_code == 400
|
||||
|
||||
# Titel fehlt → 400
|
||||
res = await client.put("/api/projekte/Alpha/features/login", json={"roh": "kein Titel"})
|
||||
assert res.status_code == 400
|
||||
|
||||
res = await client.put("/api/projekte/Alpha/features/login", json={"roh": "mehr\n" + ROH})
|
||||
assert res.status_code == 200
|
||||
assert res.json()["sektionen"]["sonstiges"] == "mehr"
|
||||
|
||||
Reference in New Issue
Block a user