JSON messages¶
-
Back to Testing Overview
Return to the Testing overview page with all topics.
published is the default path. content_type is None, and payload["event_name"] is "order_created". handled stays empty.
See Outbox usage.
await harness.mediator.send(CreateOrder(sku="book"))
message = harness.published.one(OrderCreatedNotice)
assert message.content_type is None
assert message.payload["event_name"] == "order_created"
Library example: examples/testing/domain_and_notification.py.