MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / handler

Function handler

python/openshell/sandbox_test.py:554–570  ·  view source on GitHub ↗
(request: _httpx.Request)

Source from the content-addressed store, hash-verified

552 )
553
554 def handler(request: _httpx.Request) -> _httpx.Response:
555 if request.url.path.endswith("/.well-known/openid-configuration"):
556 if seen_discovery is not None:
557 seen_discovery.append(str(request.url))
558 body = discovery or {
559 "issuer": DEFAULT_ISSUER,
560 "token_endpoint": DEFAULT_TOKEN_ENDPOINT,
561 }
562 return _httpx.Response(discovery_status, json=body)
563 # Anything else is a refresh exchange.
564 if seen_refresh is not None:
565 seen_refresh.append((str(request.url), bytes(request.content)))
566 try:
567 body = next(refresh_iter)
568 except StopIteration:
569 return _httpx.Response(500, json={"error": "test_script_exhausted"})
570 return _httpx.Response(refresh_status, json=body)
571
572 return _httpx.MockTransport(handler)
573

Callers

nothing calls this directly

Calls 1

_write_bundleFunction · 0.85

Tested by

no test coverage detected