aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/tests/unit
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2016-06-06 14:28:55 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2016-06-06 20:04:44 +0000
commitc09a3580a1e802e92dfc8a1184b9a95fc464b979 (patch)
tree07928c931cfd5887dbd2c5310eb259eb15a21f28 /src/python/grpcio/tests/unit
parent845a0567e344d2d85ece37471e63199c045c2249 (diff)
Route Python Beta API through Python GA API
Diffstat (limited to 'src/python/grpcio/tests/unit')
-rw-r--r--src/python/grpcio/tests/unit/_auth_test.py (renamed from src/python/grpcio/tests/unit/beta/_auth_test.py)2
-rw-r--r--src/python/grpcio/tests/unit/beta/test_utilities.py13
2 files changed, 7 insertions, 8 deletions
diff --git a/src/python/grpcio/tests/unit/beta/_auth_test.py b/src/python/grpcio/tests/unit/_auth_test.py
index 694928a91b..c31f7b06f7 100644
--- a/src/python/grpcio/tests/unit/beta/_auth_test.py
+++ b/src/python/grpcio/tests/unit/_auth_test.py
@@ -33,7 +33,7 @@ import collections
import threading
import unittest
-from grpc.beta import _auth
+from grpc import _auth
class MockGoogleCreds(object):
diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio/tests/unit/beta/test_utilities.py
index 0313e06a93..66b5f72897 100644
--- a/src/python/grpcio/tests/unit/beta/test_utilities.py
+++ b/src/python/grpcio/tests/unit/beta/test_utilities.py
@@ -29,7 +29,7 @@
"""Test-appropriate entry points into the gRPC Python Beta API."""
-from grpc._adapter import _intermediary_low
+import grpc
from grpc.beta import implementations
@@ -48,9 +48,8 @@ def not_really_secure_channel(
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, channel_credentials._low_credentials,
- server_host_override=server_host_override)
- return implementations.Channel(
- intermediary_low_channel._internal, intermediary_low_channel)
+ target = '%s:%d' % (host, port)
+ channel = grpc.secure_channel(
+ target, ((b'grpc.ssl_target_name_override', server_host_override,),),
+ channel_credentials._credentials)
+ return implementations.Channel(channel)