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

Function _channel_is_intercepted

python/openshell/sandbox_test.py:327–331  ·  view source on GitHub ↗

grpc.intercept_channel returns a _Channel whose module name ends in `interceptor`. We don't depend on the class name (it varies across gRPC versions); module is stable.

(channel: Any)

Source from the content-addressed store, hash-verified

325
326
327def _channel_is_intercepted(channel: Any) -> bool:
328 """grpc.intercept_channel returns a _Channel whose module name ends in
329 `interceptor`. We don't depend on the class name (it varies across
330 gRPC versions); module is stable."""
331 return type(channel).__module__.endswith("interceptor")
332
333
334def test_from_active_cluster_loads_bearer_when_auth_mode_is_oidc(

Calls

no outgoing calls

Tested by

no test coverage detected