def test_sessions_grpc_asyncio_transport_channel(): channel = aio.insecure_channel("http://localhost/") # Check that channel is used if provided. transport = transports.SessionsGrpcAsyncIOTransport( host="squid.clam.whelk", channel=channel, ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" assert transport._ssl_channel_credentials == None
def test_transport_get_channel(): # A client may be instantiated with a custom transport instance. transport = transports.SessionsGrpcTransport( credentials=credentials.AnonymousCredentials(), ) channel = transport.grpc_channel assert channel transport = transports.SessionsGrpcAsyncIOTransport( credentials=credentials.AnonymousCredentials(), ) channel = transport.grpc_channel assert channel