aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/tests/unit/beta
diff options
context:
space:
mode:
authorGravatar Christian Svensson <blue@cmd.nu>2016-03-10 16:50:58 +0100
committerGravatar Christian Svensson <blue@cmd.nu>2016-03-20 18:43:11 +0100
commitce2a2d041dd473408bb3e11c49e39cb689f20495 (patch)
tree0887a9ec7cb5fed5f1dc7dddd6f773ee47de437f /src/python/grpcio/tests/unit/beta
parent0640711b86d1d8387ba908edf329f08fa58ab289 (diff)
ssl_channel_credentials to use None by default
Since the default behavior is quite sane, support just calling ssl_channel_credentials() without explicitly specifying ssl_channel_credentials(None, None, None). This changes the pattern ssl_channel_credentials(server_crt, None, None) to ssl_channel_credentials(server_crt) Signed-off-by: Christian Svensson <blue@cmd.nu>
Diffstat (limited to 'src/python/grpcio/tests/unit/beta')
-rw-r--r--src/python/grpcio/tests/unit/beta/_beta_features_test.py6
-rw-r--r--src/python/grpcio/tests/unit/beta/_face_interface_test.py4
-rw-r--r--src/python/grpcio/tests/unit/beta/_implementations_test.py5
3 files changed, 7 insertions, 8 deletions
diff --git a/src/python/grpcio/tests/unit/beta/_beta_features_test.py b/src/python/grpcio/tests/unit/beta/_beta_features_test.py
index ea44177b49..254499884a 100644
--- a/src/python/grpcio/tests/unit/beta/_beta_features_test.py
+++ b/src/python/grpcio/tests/unit/beta/_beta_features_test.py
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -180,7 +180,7 @@ class BetaFeaturesTest(unittest.TestCase):
port = self._server.add_secure_port('[::]:0', server_credentials)
self._server.start()
self._channel_credentials = implementations.ssl_channel_credentials(
- resources.test_root_certificates(), None, None)
+ resources.test_root_certificates())
self._call_credentials = implementations.metadata_call_credentials(
_metadata_plugin)
channel = test_utilities.not_really_secure_channel(
@@ -293,7 +293,7 @@ class ContextManagementAndLifecycleTest(unittest.TestCase):
self._server_credentials = implementations.ssl_server_credentials(
[(resources.private_key(), resources.certificate_chain(),),])
self._channel_credentials = implementations.ssl_channel_credentials(
- resources.test_root_certificates(), None, None)
+ resources.test_root_certificates())
self._stub_options = implementations.stub_options(
thread_pool_size=test_constants.POOL_SIZE)
diff --git a/src/python/grpcio/tests/unit/beta/_face_interface_test.py b/src/python/grpcio/tests/unit/beta/_face_interface_test.py
index 1c21dfd03d..b516f59bb2 100644
--- a/src/python/grpcio/tests/unit/beta/_face_interface_test.py
+++ b/src/python/grpcio/tests/unit/beta/_face_interface_test.py
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@ class _Implementation(test_interfaces.Implementation):
port = server.add_secure_port('[::]:0', server_credentials)
server.start()
channel_credentials = implementations.ssl_channel_credentials(
- resources.test_root_certificates(), None, None)
+ resources.test_root_certificates())
channel = test_utilities.not_really_secure_channel(
'localhost', port, channel_credentials, _SERVER_HOST_OVERRIDE)
stub_options = implementations.stub_options(
diff --git a/src/python/grpcio/tests/unit/beta/_implementations_test.py b/src/python/grpcio/tests/unit/beta/_implementations_test.py
index 6b32305af7..26be670c45 100644
--- a/src/python/grpcio/tests/unit/beta/_implementations_test.py
+++ b/src/python/grpcio/tests/unit/beta/_implementations_test.py
@@ -38,14 +38,13 @@ from tests.unit import resources
class ChannelCredentialsTest(unittest.TestCase):
def test_runtime_provided_root_certificates(self):
- channel_credentials = implementations.ssl_channel_credentials(
- None, None, None)
+ channel_credentials = implementations.ssl_channel_credentials()
self.assertIsInstance(
channel_credentials, implementations.ChannelCredentials)
def test_application_provided_root_certificates(self):
channel_credentials = implementations.ssl_channel_credentials(
- resources.test_root_certificates(), None, None)
+ resources.test_root_certificates())
self.assertIsInstance(
channel_credentials, implementations.ChannelCredentials)