Round 3 fixes: cancelled polling, aggregator invalid_count, filter state, scheduler atomicity, HTTP exception handler, tests
This commit is contained in:
@@ -137,6 +137,15 @@ class TestProxiesAPI:
|
||||
assert response.status_code == 200
|
||||
assert response.headers["content-type"] == "application/json"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_export_proxies_json_empty_database(self, client):
|
||||
"""测试 GET /api/proxies/export/json - 空数据库"""
|
||||
response = await client.get("/api/proxies/export/json")
|
||||
assert response.status_code == 200
|
||||
assert response.headers["content-type"] == "application/json"
|
||||
# 空数据库应返回空列表 JSON
|
||||
assert response.content.strip() == b"[]"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_export_proxies_invalid_format(self, client):
|
||||
"""测试 GET /api/proxies/export/invalid - 无效格式"""
|
||||
|
||||
Reference in New Issue
Block a user