(url, headers=None, json=None, timeout=None)
| 149 | return {"choices": [{"message": {"content": "红墨连接测试成功"}}]} |
| 150 | |
| 151 | def fake_post(url, headers=None, json=None, timeout=None): |
| 152 | captured["url"] = url |
| 153 | captured["headers"] = headers |
| 154 | captured["json"] = json |
| 155 | captured["timeout"] = timeout |
| 156 | return Response() |
| 157 | |
| 158 | monkeypatch.setattr(requests, "post", fake_post) |
| 159 |
nothing calls this directly
no test coverage detected