How to use the apiritif.utils.headers_as_text function in apiritif

To help you get started, we’ve selected a few apiritif 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 Blazemeter / taurus / apiritif / __init__.py View on Github external
def assert_not_in_headers(self, member, msg=None):
        if member in headers_as_text(self.py_response.headers):
            msg = msg or "Header %s was found in response headers text" % member
            raise AssertionError(msg)
        return self
github Blazemeter / taurus / apiritif / __init__.py View on Github external
def assert_regex_not_in_headers(self, member, msg=None):
        assert_not_regexp(member, headers_as_text(self.py_response.headers), msg=msg)
        return self
github Blazemeter / taurus / apiritif / __init__.py View on Github external
def assert_in_headers(self, member, msg=None):
        headers_text = headers_as_text(self.py_response.headers)
        if member not in headers_text:
            msg = msg or "Header %s wasn't found in response headers text: %r" % (member, headers_text)
            raise AssertionError(msg)
        return self
github Blazemeter / taurus / apiritif / __init__.py View on Github external
def assert_regex_in_headers(self, member, msg=None):
        assert_regexp(member, headers_as_text(self.py_response.headers), msg=msg)
        return self