Pact Testing

Common pact-python test fixtures

For use with pact-python

API Reference

class xocto.pact_testing.PactConsumerClient(base_url: str)[source]

Bases: object

post(path: str, data: dict[str, Any], token: str | None = None) dict[str, Any][source]
xocto.pact_testing.get_git_branch_name() str | None[source]

Get the current git branch name.

xocto.pact_testing.get_unique_version_hash() str | None[source]

Get a unique version number for the pact verification for the current git revision.

  • Get git hash for the current git revision.

xocto.pact_testing.pact_service(pact_broker_url: str, pact_broker_username: str, pact_broker_password: str, pact_consumer_name: str, pact_provider_name: str, pact_version: str, publish_to_broker: bool, pact_log_path: str = 'pact_logs') Pact[source]