MCPcopy Create free account
hub / github.com/HisMax/RedInk / fake_post

Function fake_post

tests/errors_test.py:151–156  ·  view source on GitHub ↗
(url, headers=None, json=None, timeout=None)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

ResponseClass · 0.85
BadResponseClass · 0.85
GoodResponseClass · 0.85

Tested by

no test coverage detected