first commit
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user