Also test channel without interceptor

pull/36660/head
Xuan Wang 10 months ago
parent 37eab59046
commit 4b679ba429
  1. 16
      src/python/grpcio_tests/tests_aio/unit/client_unary_stream_interceptor_test.py

@ -225,14 +225,18 @@ class TestUnaryStreamClientInterceptor(AioTestBase):
async def test_too_many_reads(self):
for interceptor_class in (
_UnaryStreamInterceptorEmpty,
_UnaryStreamInterceptorWithResponseIterator,
[_UnaryStreamInterceptorEmpty],
[_UnaryStreamInterceptorWithResponseIterator],
[],
):
with self.subTest(name=interceptor_class):
interceptor = interceptor_class()
channel = aio.insecure_channel(
self._server_target, interceptors=[interceptor]
)
if interceptor_class:
interceptor = interceptor_class[0]()
channel = aio.insecure_channel(
self._server_target, interceptors=[interceptor]
)
else:
channel = aio.insecure_channel(self._server_target)
stub = test_pb2_grpc.TestServiceStub(channel)
request = messages_pb2.StreamingOutputCallRequest()

Loading…
Cancel
Save