Source: python-aiointercept Maintainer: Home Assistant Team Uploaders: Edward Betts , Section: python Build-Depends: debhelper-compat (= 13), dh-sequence-python3, pybuild-plugin-pyproject, python3-all, python3-hatchling, Build-Depends-Indep: python3-aiohttp , python3-ddt , python3-multidict , python3-pytest , python3-pytest-asyncio , python3-yarl , Standards-Version: 4.7.4 Homepage: https://github.com/Polandia94/aiointercept Vcs-Browser: https://salsa.debian.org/homeassistant-team/deps/python-aiointercept Vcs-Git: https://salsa.debian.org/homeassistant-team/deps/python-aiointercept.git Testsuite: autopkgtest-pkg-pybuild Package: python3-aiointercept Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, Description: mock HTTP request interceptor for aiohttp clients This library registers expected HTTP requests and serves configured responses from a local test server. It can match requests by URL, HTTP method, or regular expression, then return status codes, headers, raw bodies, JSON payloads, reason phrases, or callback-generated responses. . Requests are received by the local server and recorded for later inspection. The recorded data includes method, normalized URL, headers, query parameters, and request body. Helpers are provided for checking whether particular requests were made. . The library can be used as a context manager, decorator, or pytest fixture. In its default mode, client code is pointed at the local server URL. It can also patch DNS resolution so configured external hostnames are directed to the local server, with optional passthrough rules for selected hosts or unmatched requests.