def testCancelledUnaryRequestStreamResponse(self):
    for ((group, method), test_messages_sequence) in six.iteritems(self._digest.unary_stream_messages_sequences):
        for test_messages in test_messages_sequence:
            request = test_messages.request()
            with self._control.pause():
                response_iterator = self._invoker.future(group, method)(request, test_constants.LONG_TIMEOUT)
                response_iterator.cancel()
            with self.assertRaises(face.CancellationError):
                next(response_iterator)
def testCancelledUnaryRequestStreamResponse(self):
    for ((group, method), test_messages_sequence) in six.iteritems(self._digest.unary_stream_messages_sequences):
        for test_messages in test_messages_sequence:
            request = test_messages.request()
            with self._control.pause():
                response_iterator = self._invoker.future(group, method)(request, test_constants.LONG_TIMEOUT)
                response_iterator.cancel()
            with self.assertRaises(face.CancellationError):
                next(response_iterator)