fix: update E2E tests for RESTful endpoints

This commit is contained in:
qzl
2026-02-26 14:43:52 +08:00
parent 8e493ae7fd
commit 2994cc708c
3 changed files with 23 additions and 25 deletions
@@ -52,7 +52,7 @@ def test_run_route_returns_response() -> None:
client = TestClient(app)
try:
response = client.post("/api/v1/agent-chat/run", json={"message": "hello"})
response = client.post("/api/v1/agent-chat", json={"message": "hello"})
assert response.status_code == 200
body = response.json()
assert body["output"] == "hello"
@@ -72,7 +72,7 @@ def test_run_route_validates_payload() -> None:
client = TestClient(app)
try:
response = client.post("/api/v1/agent-chat/run", json={"message": ""})
response = client.post("/api/v1/agent-chat", json={"message": ""})
assert response.status_code == 422
finally:
app.dependency_overrides = {}