MCPcopy Index your code
hub / github.com/github/copilot-sdk / mock_request

Method mock_request

python/test_client.py:158–168  ·  view source on GitHub ↗
(method, params, **kwargs)

Source from the content-addressed store, hash-verified

156 captured: list[tuple[str, dict]] = []
157
158 async def mock_request(method, params, **kwargs):
159 captured.append((method, params))
160 if method == "session.eventLog.registerInterest":
161 return {"id": "interest-1"}
162 if method == "session.create":
163 result = {"sessionId": params["sessionId"], "workspacePath": None}
164 callback = kwargs.get("on_response_inline")
165 if callback is not None:
166 callback(result)
167 return result
168 return {}
169
170 client._client.request = mock_request
171 await client.create_session(

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected