Dataclass requests¶
-
Back to Testing Overview
Return to the Testing overview page with all topics.
requests.of(...).response is the object send returned. The harness adds no validator, so no validation record sits beside requests. This is the default path.
See Dataclasses.
await harness.mediator.send(CreateOrder(sku="book"))
assert harness.requests.of(CreateOrder)[0].response == CreatedOrder(order_id="1")
Library example: examples/testing/command_and_query.py.