Open
Description
Hello,
I want to use the matchers in my consumer tests but using them is kinda weird.
The way that I would expect them to work according to docs is:
event = {
"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"],
}
This works but is the same as passing in a string directly and defeats the purpose of the matcher.