fix the lint error in backend

This commit is contained in:
Willem Jiang
2026-04-26 15:09:25 +08:00
parent 3b71e2d377
commit 829e82a9af
15 changed files with 76 additions and 49 deletions
+8 -6
View File
@@ -1,15 +1,14 @@
"""Tests for GET /api/runs/{run_id}/messages and GET /api/runs/{run_id}/feedback endpoints."""
from __future__ import annotations
from unittest.mock import AsyncMock, MagicMock, patch
from unittest.mock import AsyncMock, MagicMock
import pytest
from _router_auth_helpers import make_authed_test_app
from fastapi.testclient import TestClient
from app.gateway.routers import runs
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
@@ -113,7 +112,8 @@ def test_run_messages_passes_after_seq_to_event_store():
response = client.get("/api/runs/run-3/messages?after_seq=5")
assert response.status_code == 200
event_store.list_messages_by_run.assert_awaited_once_with(
"thread-3", "run-3",
"thread-3",
"run-3",
limit=51, # default limit(50) + 1
before_seq=None,
after_seq=5,
@@ -133,7 +133,8 @@ def test_run_messages_respects_custom_limit():
response = client.get("/api/runs/run-4/messages?limit=10")
assert response.status_code == 200
event_store.list_messages_by_run.assert_awaited_once_with(
"thread-4", "run-4",
"thread-4",
"run-4",
limit=11, # 10 + 1
before_seq=None,
after_seq=None,
@@ -153,7 +154,8 @@ def test_run_messages_passes_before_seq_to_event_store():
response = client.get("/api/runs/run-5/messages?before_seq=10")
assert response.status_code == 200
event_store.list_messages_by_run.assert_awaited_once_with(
"thread-5", "run-5",
"thread-5",
"run-5",
limit=51,
before_seq=10,
after_seq=None,