Overview of pytest-httpx capabilities
developpytest-httpx provides a comprehensive suite of tools for mocking HTTP interactions with httpx, including:
- Response Customization: Add JSON bodies, custom bodies, multipart bodies (files, etc.), non-200 status codes, and custom headers.
- Advanced Protocols: Support for HTTP/2.0.
- Dynamic Behavior: Add dynamic responses and raise exceptions.
- Verification: Check sent requests to ensure your code is making the expected calls.
- Configuration: Control how many responses are registered, allow reusing responses, and skip mocking for specific hosts.