MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / wrapped

Function wrapped

tests/interaction/auth/_harness.py:236–256  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

234 }
235
236 async def wrapped(scope: Scope, receive: Receive, send: Send) -> None:
237 path = scope["path"]
238 if path in overrides:
239 status, body = overrides[path]
240 await send(
241 {
242 "type": "http.response.start",
243 "status": status,
244 "headers": [
245 (b"content-type", b"application/json"),
246 (b"content-length", str(len(body)).encode()),
247 ],
248 }
249 )
250 await send({"type": "http.response.body", "body": body})
251 return
252 if path in not_found:
253 await send({"type": "http.response.start", "status": 404, "headers": []})
254 await send({"type": "http.response.body", "body": b""})
255 return
256 await app(scope, receive, send)
257
258 return wrapped
259

Callers

nothing calls this directly

Calls 5

OAuthTokenClass · 0.90
mint_access_tokenMethod · 0.80
sendFunction · 0.50
appFunction · 0.50
receiveFunction · 0.50

Tested by

no test coverage detected