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

Class TestDataEndpoint

tests/test_api.py:115–125  ·  view source on GitHub ↗

仿真数据接口基本契约。

Source from the content-addressed store, hash-verified

113
114
115class TestDataEndpoint:
116 """仿真数据接口基本契约。"""
117
118 def test_status_200(self, client):
119 assert client.get("/api/data").status_code == 200
120
121 def test_response_is_dict(self, client):
122 assert isinstance(_json(client.get("/api/data")), dict)
123
124 def test_response_is_nonempty(self, client):
125 assert len(_json(client.get("/api/data"))) > 0
126
127
128# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected