24 lines
633 B
Python
24 lines
633 B
Python
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)
|