|
|
@ -193,7 +193,7 @@ class MetadataTest(unittest.TestCase): |
|
|
|
def testStreamUnary(self): |
|
|
|
def testStreamUnary(self): |
|
|
|
multi_callable = self._channel.stream_unary(_STREAM_UNARY) |
|
|
|
multi_callable = self._channel.stream_unary(_STREAM_UNARY) |
|
|
|
unused_response, call = multi_callable.with_call( |
|
|
|
unused_response, call = multi_callable.with_call( |
|
|
|
[_REQUEST] * test_constants.STREAM_LENGTH, |
|
|
|
iter([_REQUEST] * test_constants.STREAM_LENGTH), |
|
|
|
metadata=_CLIENT_METADATA) |
|
|
|
metadata=_CLIENT_METADATA) |
|
|
|
self.assertTrue(test_common.metadata_transmitted( |
|
|
|
self.assertTrue(test_common.metadata_transmitted( |
|
|
|
_SERVER_INITIAL_METADATA, call.initial_metadata())) |
|
|
|
_SERVER_INITIAL_METADATA, call.initial_metadata())) |
|
|
@ -202,7 +202,7 @@ class MetadataTest(unittest.TestCase): |
|
|
|
|
|
|
|
|
|
|
|
def testStreamStream(self): |
|
|
|
def testStreamStream(self): |
|
|
|
multi_callable = self._channel.stream_stream(_STREAM_STREAM) |
|
|
|
multi_callable = self._channel.stream_stream(_STREAM_STREAM) |
|
|
|
call = multi_callable([_REQUEST] * test_constants.STREAM_LENGTH, |
|
|
|
call = multi_callable(iter([_REQUEST] * test_constants.STREAM_LENGTH), |
|
|
|
metadata=_CLIENT_METADATA) |
|
|
|
metadata=_CLIENT_METADATA) |
|
|
|
self.assertTrue(test_common.metadata_transmitted( |
|
|
|
self.assertTrue(test_common.metadata_transmitted( |
|
|
|
_SERVER_INITIAL_METADATA, call.initial_metadata())) |
|
|
|
_SERVER_INITIAL_METADATA, call.initial_metadata())) |
|
|
|