fix(tests): AP0.10 pytest — blockers ohne milestone_id, COUNT mit RealDictCursor
All checks were successful
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 1m10s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
All checks were successful
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 1m10s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
Behebt test_steering_snapshot_graph und test_blocker_resolve_unblocks_action. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1b19deb728
commit
6ea663b4c4
|
|
@ -108,7 +108,7 @@ def get_initiative_steering_snapshot(
|
||||||
|
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"""
|
"""
|
||||||
SELECT id, action_id, milestone_id, title, status, created_at, updated_at
|
SELECT id, action_id, title, status, created_at, updated_at
|
||||||
FROM blockers
|
FROM blockers
|
||||||
WHERE tenant_id = %s AND initiative_id = %s
|
WHERE tenant_id = %s AND initiative_id = %s
|
||||||
ORDER BY updated_at DESC
|
ORDER BY updated_at DESC
|
||||||
|
|
@ -194,7 +194,6 @@ def get_initiative_steering_snapshot(
|
||||||
"title": b["title"],
|
"title": b["title"],
|
||||||
"status": b["status"],
|
"status": b["status"],
|
||||||
"action_id": _sid(b.get("action_id")),
|
"action_id": _sid(b.get("action_id")),
|
||||||
"milestone_id": _sid(b.get("milestone_id")),
|
|
||||||
}
|
}
|
||||||
aid = item["action_id"]
|
aid = item["action_id"]
|
||||||
if aid:
|
if aid:
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,15 @@ def after_blocker_status_change(
|
||||||
|
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"""
|
"""
|
||||||
SELECT COUNT(*) FROM blockers
|
SELECT COUNT(*) AS remaining
|
||||||
|
FROM blockers
|
||||||
WHERE tenant_id = %s AND action_id = %s
|
WHERE tenant_id = %s AND action_id = %s
|
||||||
AND id != %s AND status IN ('open', 'in_progress')
|
AND id != %s AND status IN ('open', 'in_progress')
|
||||||
""",
|
""",
|
||||||
(tenant_id, action_id, blocker_id),
|
(tenant_id, action_id, blocker_id),
|
||||||
)
|
)
|
||||||
remaining = cur.fetchone()[0]
|
row = cur.fetchone()
|
||||||
|
remaining = int(row["remaining"]) if row else 0
|
||||||
if remaining > 0:
|
if remaining > 0:
|
||||||
effects.append(
|
effects.append(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user