def METHOD_NAME(self, mock_command):
    process = CommandProcess(mock_command)
    process.command.command.process.poll = self.flow
    process.command.command.output_available = self.flow_out_available
    process.command.command.error_available = self.flow_err_available
    process.command.command.output.read = self.flow_out
    process.command.command.error.read = self.flow_err
    process.command.command.process.returncode = 1
    with self._caplog.at_level(logging.DEBUG):
        result = process.poll_and_watch()
        assert '--------------out start-------------' in self._caplog.text
        assert 'data' in self._caplog.text
        assert '--------------out stop--------------' in self._caplog.text
        assert result.stderr == 'error'