first commit

This commit is contained in:
strepsiades
2026-03-09 16:31:42 +08:00
commit 4a9c444b10
486 changed files with 52479 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
from __future__ import annotations
from fastapi.testclient import TestClient
from ui.app import create_app
def test_ui_api_smoke() -> None:
app = create_app()
client = TestClient(app)
status_resp = client.get("/api/status")
assert status_resp.status_code == 200
status_data = status_resp.json()
assert "running" in status_data
assert "last_error" in status_data
cfg_resp = client.get("/api/config/default")
assert cfg_resp.status_code == 200
cfg_data = cfg_resp.json()
assert "mode" in cfg_data
assert "node_types" in cfg_data
assert isinstance(cfg_data["node_types"], list)