Maurice Mretens
09/21/2022, 6:49 PMevent = {
"event": "delivery:created",
"delivery_type": matchers.Term("express|standard", "standard"),
}
(
pact_no_publish.given("Delivery has standard shipping")
.expects_to_receive("delivery:created")
.with_content(event)
.with_metadata({"Content-Type": "application/json"})
)
What this does is to pass the Term object into the message.
What I have to do in this case is this:
event = {
"event": "delivery:created",
"delivery_type": matchers.Term("express|standard", "standard").generate()["data"]["generate"],
}
Is this the intended way or should it be done im some other way?