Round 3 fixes: cancelled polling, aggregator invalid_count, filter state, scheduler atomicity, HTTP exception handler, tests

This commit is contained in:
祀梦
2026-04-05 10:20:23 +08:00
parent 49e440cb41
commit dc5f050683
32 changed files with 321 additions and 163 deletions

View File

@@ -45,3 +45,13 @@ class TestHealthAPI:
assert isinstance(data["database"], str)
assert isinstance(data["scheduler"], str)
assert isinstance(data["version"], str)
@pytest.mark.asyncio
async def test_404_not_found_unified_format(self, client):
"""测试 404 返回统一格式"""
response = await client.get("/api/not-exist")
assert response.status_code == 404
data = response.json()
assert data["code"] == 404
assert "message" in data
assert data["data"] is None