How to use the pactman.verifier.broker_pact.BrokerPact function in pactman

To help you get started, we’ve selected a few pactman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github reecetech / pactman / pactman / verifier / pytest_plugin.py View on Github external
def get_pact_files(file_location):
    if not file_location:
        return []
    for filename in glob.glob(file_location):
        yield BrokerPact.load_file(filename, result_factory=PytestResult)
github reecetech / pactman / pactman / verifier / command_line.py View on Github external
def get_pacts(args):
    result_log_level = get_log_level(args)
    result_factory = partial(CaptureResult, level=result_log_level)
    if args.local_pact_file:
        pacts = [BrokerPact.load_file(args.local_pact_file, result_factory)]
    else:
        broker_config = PactBrokerConfig(
            args.broker_url, args.broker_token, args.consumer_version_tag
        )
        pacts = BrokerPacts(args.provider_name, broker_config, result_factory).consumers()
    return pacts
github reecetech / pactman / pactman / verifier / broker_pact.py View on Github external
def consumers(self):
        for broker_pact, pact_contents in self.pact_broker.get_pacts_for_provider(
            self.provider_name
        ):
            yield BrokerPact(pact_contents, self.result_factory, broker_pact)