MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / FakeResponse

Class FakeResponse

tests/test_temp_mail_service.py:4–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3
4class FakeResponse:
5 def __init__(self, status_code=200, payload=None, text=""):
6 self.status_code = status_code
7 self._payload = payload
8 self.text = text
9 self.headers = {}
10
11 def json(self):
12 if self._payload is None:
13 raise ValueError("no json payload")
14 return self._payload
15
16
17class FakeHTTPClient:

Calls

no outgoing calls