mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
1. 调整后端模块路由与插件文件结构,迁移部分模块代码至api/v1目录 2. 优化代码注释格式与文档字符串,简化冗余代码 3. 添加监控仪表盘、工单评论等新模块功能 4. 修复前端部分组件交互逻辑与类型定义 5. 清理冗余的初始化数据与废弃配置文件 6. 新增租户注册表单字段与国际化支持 7. 优化HTTP请求拦截器与快捷键功能
21 lines
617 B
Python
21 lines
617 B
Python
"""应用入口测试 —— 健康检查接口返回码与响应体校验。
|
|
"""
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
|
|
def test_check_readiness(test_client: TestClient) -> None:
|
|
response = test_client.get("/common/health/ready/")
|
|
assert response.status_code == 200
|
|
body = response.json()
|
|
assert body["success"] is True
|
|
assert body["data"] is not None
|
|
|
|
|
|
def test_check_health(test_client: TestClient) -> None:
|
|
response = test_client.get("/common/health/")
|
|
assert response.status_code == 200
|
|
body = response.json()
|
|
assert body["success"] is True
|
|
assert body["code"] == 0
|