MCPcopy Create free account
hub / github.com/hynek/structlog / test_simplejson

Method test_simplejson

tests/processors/test_renderers.py:359–371  ·  view source on GitHub ↗

Integration test with simplejson.

(self, event_dict)

Source from the content-addressed store, hash-verified

357
358 @pytest.mark.skipif(simplejson is None, reason="simplejson is missing.")
359 def test_simplejson(self, event_dict):
360 """
361 Integration test with simplejson.
362 """
363 jr = JSONRenderer(serializer=simplejson.dumps)
364
365 assert {
366 "a": "<A(\\o/)>",
367 "b": [3, 4],
368 "x": 7,
369 "y": "test",
370 "z": [1, 2],
371 } == json.loads(jr(None, None, event_dict))
372
373
374class TestTimeStamper:

Callers

nothing calls this directly

Calls 2

JSONRendererClass · 0.90
jrFunction · 0.85

Tested by

no test coverage detected