MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / FakeResponse

Class FakeResponse

tests/test_fastapi_v1_dashboard.py:1977–1995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1975 return self._text.encode("utf-8")[:size]
1976
1977 class FakeResponse:
1978 def __init__(self, status: int, *, text: str = "", payload=None):
1979 self.status = status
1980 self._text = text
1981 self._payload = payload or {}
1982 self.headers = {}
1983 self.content = FakeContent(text)
1984
1985 async def __aenter__(self):
1986 return self
1987
1988 async def __aexit__(self, exc_type, exc, tb) -> None:
1989 return None
1990
1991 async def json(self):
1992 return self._payload
1993
1994 async def text(self):
1995 return self._text
1996
1997 class FakeClientSession:
1998 def __init__(self, **kwargs):

Callers 1

getMethod · 0.70

Calls 1

FakeContentClass · 0.85

Tested by 1

getMethod · 0.56