def test_json_formatter_easy_extra_types(json_formatter): record = LogRecord( name='test', level=INFO, pathname='/test.py', lineno=1337, msg="This is a test", args=[], exc_info=None ) record.extra_one = 'String Test' record.extra_two = 1092384901283490120984 record.extra_three = ['list test'] actual = json.loads(json_formatter.format(record)) assert_contains(actual, { 'extra_one': 'String Test', 'extra_two': 1092384901283490120984, 'extra_three': ['list test'], })