How to use the pook.matchers.base.BaseMatcher.__init__ function in pook

To help you get started, we’ve selected a few pook 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 h2non / pook / pook / matchers / json_schema.py View on Github external
def __init__(self, schema):
        BaseMatcher.__init__(self, schema)

        if isinstance(schema, str):
            self.expectation = json.loads(schema)
github h2non / pook / pook / matchers / headers.py View on Github external
def __init__(self, headers):
        if not isinstance(headers, dict):
            raise TypeError('headers must be a dictionary')
        BaseMatcher.__init__(self, headers)
github h2non / pook / pook / matchers / xml.py View on Github external
def __init__(self, data):
        BaseMatcher.__init__(self, data)

        if isinstance(data, str):
            self.expectation = xmltodict.parse(data)
github h2non / pook / pook / matchers / json.py View on Github external
def __init__(self, data):
        BaseMatcher.__init__(self, data)

        if isinstance(data, str):
            self.expectation = json.loads(data)