def test_format(self):
    formatter = ConsoleLogFormatter()
    mock_message = 'test message 1'
    record = MockRecord()
    record.msg = mock_message
    message = formatter.format(record=record)
    self.assertEqual(message, mock_message)
    mock_message = 'test message 2'
    record = MockRecord()
    record.msg = mock_message
    record._user_id = 1
    record._value = 'bar'
    record.ignored = 'foo'
    message = formatter.format(record=record)
    expected = "test message 2 (value='bar',user_id=1)"
    self.assertEqual(sorted(message), sorted(expected))
def test_format(self):
    formatter = ConsoleLogFormatter()
    mock_message = 'test message 1'
    record = MockRecord()
    record.msg = mock_message
    message = formatter.format(record=record)
    self.assertEqual(message, mock_message)
    mock_message = 'test message 2'
    record = MockRecord()
    record.msg = mock_message
    record._user_id = 1
    record._value = 'bar'
    record.ignored = 'foo'
    message = formatter.format(record=record)
    expected = "test message 2 (value='bar',user_id=1)"
    self.assertEqual(sorted(message), sorted(expected))