diff --git a/tests/test_e2e_four_phase.py b/tests/test_e2e_four_phase.py index 743de32..e3c9824 100644 --- a/tests/test_e2e_four_phase.py +++ b/tests/test_e2e_four_phase.py @@ -90,7 +90,11 @@ def _list_tasks(pid: str, **params) -> List[Dict]: resp = http_requests.get( f"{API_BASE}/api/projects/{pid}/tasks", params=params, timeout=10) assert resp.status_code == 200 - return resp.json() + data = resp.json() + # API 返回 {"tasks": [...]} 或直接 [...] + if isinstance(data, dict) and "tasks" in data: + return data["tasks"] + return data def _update_status(pid: str, tid: str, status: str,