|
|
|
@ -1,3 +1,18 @@ |
|
|
|
|
# Copyright 2020 The gRPC Authors. |
|
|
|
|
# |
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
# you may not use this file except in compliance with the License. |
|
|
|
|
# You may obtain a copy of the License at |
|
|
|
|
# |
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
|
|
|
# |
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
# See the License for the specific language governing permissions and |
|
|
|
|
# limitations under the License. |
|
|
|
|
"""Tests the behaviour of the Call classes under a secure channel.""" |
|
|
|
|
|
|
|
|
|
import unittest |
|
|
|
|
import logging |
|
|
|
|
|
|
|
|
@ -89,11 +104,12 @@ _STREAM_OUTPUT_REQUEST_ONE_RESPONSE.response_parameters.append( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestStreamStreamSecureCall(_SecureCallMixin, AioTestBase): |
|
|
|
|
_STREAM_ITERATIONS = 2 |
|
|
|
|
|
|
|
|
|
async def test_async_generator_secure_channel(self): |
|
|
|
|
|
|
|
|
|
async def request_generator(): |
|
|
|
|
for _ in range(2): |
|
|
|
|
for _ in range(self._STREAM_ITERATIONS): |
|
|
|
|
yield _STREAM_OUTPUT_REQUEST_ONE_RESPONSE |
|
|
|
|
|
|
|
|
|
call_credentials = grpc.composite_call_credentials( |
|
|
|
|