完成部分API路由以及文档

This commit is contained in:
2025-06-18 02:14:37 +08:00
parent 127fb6972f
commit eb3d2843eb
22 changed files with 2867 additions and 2 deletions

15
test_main.py Normal file
View File

@@ -0,0 +1,15 @@
from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_read_main():
from pkg.conf.appmeta import BackendVersion
response = client.get("/api/site/ping")
assert response.status_code == 200
assert response.json() == {
"code": 0,
'data': BackendVersion,
'msg': None}