def test_process_one_multiline():
    # Build our expected message
    message = {'module': 'log',
               'funcName': 'log_exception',
               'message': '1\n2\n3\n',
               'filename': 'log.py',
               'lineno': 214, 'args': [],
               'exc_text': 'Traceback (most recent call last):',
               'kind': 'app',
               'pathname': '/some/path.py',
               'source': 'eric-desktop'}

    message_params = {k: v for k, v in message.items()
                      # Intentionally ignoring Pylint's reservations about
                      # accessing private members here
                      # pylint: disable=W0212
                      if k in UniqueMessage._fields}
                      # pylint: enable=W0212
    # Make sure we clip after the newline.
    message_params['message'] = '1'
    expected_message = _package_unique_message(message_params)

    # Set up mocks for the queue and buffer.
    message_queue = Mock()
    message_queue.get.return_value = message
    message_buffer = Mock()

    _process_one_message(message_queue, message_buffer)

    # Make sure we sent this message to the buffer as expected.
    message_buffer.add.assert_called_once_with(expected_message,
                                               message['source'])
Test we gracefully handle a message where the message file is split
dataset/ETHPy150Open wingu/failnozzle/failnozzle/tests/test_server.py/test_process_one_multiline