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

Method test_order_missing

tests/processors/test_renderers.py:55–63  ·  view source on GitHub ↗

Missing keys get rendered as None.

(self, event_dict)

Source from the content-addressed store, hash-verified

53 assert r"y='test' b=[3, 4] a=<A(\o/)> z=(1, 2) x=7" == rv
54
55 def test_order_missing(self, event_dict):
56 """
57 Missing keys get rendered as None.
58 """
59 rv = KeyValueRenderer(key_order=["c", "y", "b", "a", "z", "x"])(
60 None, None, event_dict
61 )
62
63 assert r"c=None y='test' b=[3, 4] a=<A(\o/)> z=(1, 2) x=7" == rv
64
65 def test_order_missing_dropped(self, event_dict):
66 """

Callers

nothing calls this directly

Calls 1

KeyValueRendererClass · 0.90

Tested by

no test coverage detected