test: fix test_tasks_parses_yaml for TaskEntry schema
TaskEntry now includes prompt/system fields (default ""). Switch from exact dict comparison to field-by-field assertions so the test is forward-compatible with optional schema additions.
This commit is contained in:
parent
dffb1d0d7a
commit
dc2dc70ef9
1 changed files with 5 additions and 2 deletions
|
|
@ -82,8 +82,11 @@ def test_tasks_parses_yaml(client, config_dir, tmp_path):
|
||||||
assert r.status_code == 200
|
assert r.status_code == 200
|
||||||
data = r.json()
|
data = r.json()
|
||||||
assert len(data["tasks"]) == 2
|
assert len(data["tasks"]) == 2
|
||||||
assert data["tasks"][0] == {"id": "t1", "name": "Task One", "type": "instruction"}
|
# TaskEntry now includes optional prompt/system fields (default "")
|
||||||
assert data["tasks"][1] == {"id": "t2", "name": "Task Two", "type": "reasoning"}
|
t1 = data["tasks"][0]
|
||||||
|
assert t1["id"] == "t1" and t1["name"] == "Task One" and t1["type"] == "instruction"
|
||||||
|
t2 = data["tasks"][1]
|
||||||
|
assert t2["id"] == "t2" and t2["name"] == "Task Two" and t2["type"] == "reasoning"
|
||||||
assert "instruction" in data["types"]
|
assert "instruction" in data["types"]
|
||||||
assert "reasoning" in data["types"]
|
assert "reasoning" in data["types"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue