仿真数据接口基本契约。
| 113 | |
| 114 | |
| 115 | class 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 | # --------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected