feat: 添加 API 路由(公告/爬取/微信回调/调度器)+ 健康检查测试

This commit is contained in:
2026-05-09 14:19:11 +08:00
parent 3616e5799d
commit a0a06dfd8c
12 changed files with 341 additions and 0 deletions
View File
+12
View File
@@ -0,0 +1,12 @@
import pytest
from httpx import AsyncClient, ASGITransport
from app.main import app
@pytest.mark.asyncio
async def test_health():
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
response = await client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "ok"}