MCPcopy Create free account
hub / github.com/Tong89/smartNode / TestDataEndpoint

Class TestDataEndpoint

tests/test_api_integration.py:108–121  ·  view source on GitHub ↗

仿真数据接口契约。

Source from the content-addressed store, hash-verified

106# ---------------------------------------------------------------------------
107
108class TestDataEndpoint:
109 """仿真数据接口契约。"""
110
111 def test_returns_200(self, client):
112 resp = client.get("/api/data")
113 assert resp.status_code == 200
114
115 def test_response_is_json_object(self, client):
116 data = _json(client.get("/api/data"))
117 assert isinstance(data, dict)
118
119 def test_response_contains_satellites(self, client):
120 data = _json(client.get("/api/data"))
121 assert "satellites" in data or "leo_satellites" in data or len(data) > 0
122
123
124# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected