aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/unit/_credentials_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_tests/tests/unit/_credentials_test.py')
-rw-r--r--src/python/grpcio_tests/tests/unit/_credentials_test.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/python/grpcio_tests/tests/unit/_credentials_test.py b/src/python/grpcio_tests/tests/unit/_credentials_test.py
index 87af85a0b9..21bf29789a 100644
--- a/src/python/grpcio_tests/tests/unit/_credentials_test.py
+++ b/src/python/grpcio_tests/tests/unit/_credentials_test.py
@@ -26,7 +26,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
"""Tests of credentials."""
import unittest
@@ -36,37 +35,38 @@ import grpc
class CredentialsTest(unittest.TestCase):
- def test_call_credentials_composition(self):
- first = grpc.access_token_call_credentials('abc')
- second = grpc.access_token_call_credentials('def')
- third = grpc.access_token_call_credentials('ghi')
+ def test_call_credentials_composition(self):
+ first = grpc.access_token_call_credentials('abc')
+ second = grpc.access_token_call_credentials('def')
+ third = grpc.access_token_call_credentials('ghi')
+
+ first_and_second = grpc.composite_call_credentials(first, second)
+ first_second_and_third = grpc.composite_call_credentials(first, second,
+ third)
- first_and_second = grpc.composite_call_credentials(first, second)
- first_second_and_third = grpc.composite_call_credentials(
- first, second, third)
-
- self.assertIsInstance(first_and_second, grpc.CallCredentials)
- self.assertIsInstance(first_second_and_third, grpc.CallCredentials)
+ self.assertIsInstance(first_and_second, grpc.CallCredentials)
+ self.assertIsInstance(first_second_and_third, grpc.CallCredentials)
- def test_channel_credentials_composition(self):
- first_call_credentials = grpc.access_token_call_credentials('abc')
- second_call_credentials = grpc.access_token_call_credentials('def')
- third_call_credentials = grpc.access_token_call_credentials('ghi')
- channel_credentials = grpc.ssl_channel_credentials()
+ def test_channel_credentials_composition(self):
+ first_call_credentials = grpc.access_token_call_credentials('abc')
+ second_call_credentials = grpc.access_token_call_credentials('def')
+ third_call_credentials = grpc.access_token_call_credentials('ghi')
+ channel_credentials = grpc.ssl_channel_credentials()
- channel_and_first = grpc.composite_channel_credentials(
- channel_credentials, first_call_credentials)
- channel_first_and_second = grpc.composite_channel_credentials(
- channel_credentials, first_call_credentials, second_call_credentials)
- channel_first_second_and_third = grpc.composite_channel_credentials(
- channel_credentials, first_call_credentials, second_call_credentials,
- third_call_credentials)
+ channel_and_first = grpc.composite_channel_credentials(
+ channel_credentials, first_call_credentials)
+ channel_first_and_second = grpc.composite_channel_credentials(
+ channel_credentials, first_call_credentials,
+ second_call_credentials)
+ channel_first_second_and_third = grpc.composite_channel_credentials(
+ channel_credentials, first_call_credentials,
+ second_call_credentials, third_call_credentials)
- self.assertIsInstance(channel_and_first, grpc.ChannelCredentials)
- self.assertIsInstance(channel_first_and_second, grpc.ChannelCredentials)
- self.assertIsInstance(
- channel_first_second_and_third, grpc.ChannelCredentials)
+ self.assertIsInstance(channel_and_first, grpc.ChannelCredentials)
+ self.assertIsInstance(channel_first_and_second, grpc.ChannelCredentials)
+ self.assertIsInstance(channel_first_second_and_third,
+ grpc.ChannelCredentials)
if __name__ == '__main__':
- unittest.main(verbosity=2)
+ unittest.main(verbosity=2)