Example #1
0
def test_formatter_with_context(record, context):
    log = AddContextFormatter().format(record)
    assert log.strip() == '{} {}'.format(record.message, 'rid:42')
Example #2
0
def test_formatter_with_context(record, context):
    log = AddContextFormatter().format(record)
    assert log.strip() == '{} {}'.format(record.message, 'rid:42')
Example #3
0
def test_formatter_no_context(record):
    log = AddContextFormatter().format(record)
    assert log.strip() == record.message
Example #4
0
def test_formatter_no_context(record):
    log = AddContextFormatter().format(record)
    assert log.strip() == record.message