Hello, someone could share me an example using `co...
# pact-python
a
Hello, someone could share me an example using
consumer_versions
. I'm trying to migrate from 2.0.0 to 3.1.0 but I haven't been able to reach it.
This is my code:
Copy code
verifier = verifier.state_handler(
    handler=f"{str(PROVIDER_URL)}/_pact/provider_states",
    teardown=True,
    body=False
).broker_source(
    url=os.environ['PACT_BROKER_BASE_URL'],
    username=os.environ['PACT_BROKER_BASIC_AUTH_USERNAME'],
    password=os.environ['PACT_BROKER_BASIC_AUTH_PASSWORD'],
    selector=True
).consumer_versions("main_branch", "deployed", "matching_branch"
).provider_branch(
    pact_utils.get_branch()
).include_pending().include_wip_since(
    "2024-01-01"
).build()
verifier.set_publish_options(
    version=pact_utils.get_version_app_for_pact(),
    branch=pact_utils.get_branch()
)
j
I haven't released the update, but there's a new update to
consumer_version
, because quite frankly, passing inline JSON is not ideal 馃槄 https://github.com/pact-foundation/pact-python/pull/1315
鉂わ笍 2
I'm going to update any docs that might be using the old
consumer_versions
method
I should be fine to do a release later today actually
thankyou 1
a
It works for me. Thank you so much.