From 79cfbfb42aa0d3f5ca1bac4941d2e633ab4b61b8 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Fri, 29 May 2026 12:26:59 +0800 Subject: [PATCH] auto-sync: 2026-05-29 12:26:59 --- tests/test_e2e_four_phase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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,