def testSuccessfulStreamRequestUnaryResponse(self):
    for ((group, method), test_messages_sequence) in six.iteritems(self._digest.stream_unary_messages_sequences):
        for test_messages in test_messages_sequence:
            requests = test_messages.requests()
            request_iterator = _PauseableIterator(iter(requests))
            callback = _Callback()
            with request_iterator.pause():
                response_future = self._invoker.future(group, method)(request_iterator, test_constants.LONG_TIMEOUT)
                response_future.add_done_callback(callback)
            future_passed_to_callback = callback.future()
            response = future_passed_to_callback.result()
            test_messages.verify(requests, response, self)
            self.assertIs(future_passed_to_callback, response_future)
def testSuccessfulStreamRequestUnaryResponse(self):
    for ((group, method), test_messages_sequence) in six.iteritems(self._digest.stream_unary_messages_sequences):
        for test_messages in test_messages_sequence:
            requests = test_messages.requests()
            request_iterator = _PauseableIterator(iter(requests))
            callback = _Callback()
            with request_iterator.pause():
                response_future = self._invoker.future(group, method)(request_iterator, test_constants.LONG_TIMEOUT)
                response_future.add_done_callback(callback)
            future_passed_to_callback = callback.future()
            response = future_passed_to_callback.result()
            test_messages.verify(requests, response, self)
            self.assertIs(future_passed_to_callback, response_future)