aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_test/grpc_test/beta/test_utilities.py
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2015-09-05 03:55:19 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2015-09-05 03:55:19 +0000
commitf65d3c11023cd39b73c8832947889f656f2427a3 (patch)
tree8afa01ed7e6ca1b6e73a9a3eb5aa57b4a17f196c /src/python/grpcio_test/grpc_test/beta/test_utilities.py
parent41abb052b8ed180ca14b9ff1427a215b8e4dcd60 (diff)
Beta API clean-ups
(1) Renamed the "beta" module "implementations" because it hasn't been monolithic since "interfaces" was factored out of it a few changes back. (2) Moved ChannelConnectivity from grpc.beta.beta to grpc.beta.interfaces since it is constants that don't depend on the beta implementation. (3) Moved the Server interface definition from grpc.beta.beta to grpc.beta.interfaces since it is an interface. (4) Dropped the "create_" prefix from "create_<...>_channel" functions to better match the other creation functions throughout the codebase.
Diffstat (limited to 'src/python/grpcio_test/grpc_test/beta/test_utilities.py')
-rw-r--r--src/python/grpcio_test/grpc_test/beta/test_utilities.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/python/grpcio_test/grpc_test/beta/test_utilities.py b/src/python/grpcio_test/grpc_test/beta/test_utilities.py
index 338670478d..24a8600e12 100644
--- a/src/python/grpcio_test/grpc_test/beta/test_utilities.py
+++ b/src/python/grpcio_test/grpc_test/beta/test_utilities.py
@@ -30,25 +30,27 @@
"""Test-appropriate entry points into the gRPC Python Beta API."""
from grpc._adapter import _intermediary_low
-from grpc.beta import beta
+from grpc.beta import implementations
-def create_not_really_secure_channel(
+def not_really_secure_channel(
host, port, client_credentials, server_host_override):
"""Creates an insecure Channel to a remote host.
Args:
host: The name of the remote host to which to connect.
port: The port of the remote host to which to connect.
- client_credentials: The beta.ClientCredentials with which to connect.
+ client_credentials: The implementations.ClientCredentials with which to
+ connect.
server_host_override: The target name used for SSL host name checking.
Returns:
- A beta.Channel to the remote host through which RPCs may be conducted.
+ An implementations.Channel to the remote host through which RPCs may be
+ conducted.
"""
hostport = '%s:%d' % (host, port)
intermediary_low_channel = _intermediary_low.Channel(
hostport, client_credentials._intermediary_low_credentials,
server_host_override=server_host_override)
- return beta.Channel(
+ return implementations.Channel(
intermediary_low_channel._internal, intermediary_low_channel)