MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / _mock_client_response_init

Function _mock_client_response_init

conftest.py:89–98  ·  view source on GitHub ↗
(
        self: Any, method: str, url: Any, request_info: Any = None
    )

Source from the content-addressed store, hash-verified

87 return fallback_loop[0]
88
89 def _mock_client_response_init(
90 self: Any, method: str, url: Any, request_info: Any = None
91 ) -> None:
92 kwargs: dict[str, Any] = dict.fromkeys(keyword_only)
93 kwargs["request_info"] = request_info
94 if "loop" in kwargs:
95 kwargs["loop"] = _resolve_loop()
96 if "stream_writer" in kwargs:
97 kwargs["stream_writer"] = _NullStreamWriter()
98 ClientResponse.__init__(self, method, url, **kwargs)
99
100 aiohttp_stubs.MockClientResponse.__init__ = _mock_client_response_init
101 aiohttp_stubs.MockClientResponse._crewai_aiohttp_patched = True

Callers

nothing calls this directly

Calls 3

_resolve_loopFunction · 0.85
_NullStreamWriterClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected