A utility for mocking out the Python HTTPX library.
Project description
RESPX
A utility for mocking out the Python HTTPX library.
import httpx import respx @respx.mock async def test_something(): request = respx.post("https://foo.bar/baz/", status_code=201) response = await httpx.post("https://foo.bar/baz/") assert request.called assert response.status_code == 201
Documentation
Full documentation is available at lundberg.github.io/respx
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size respx-0.8-py3-none-any.whl (14.5 kB) | File type Wheel | Python version py3 | Upload date | Hashes View hashes |
Filename, size respx-0.8.tar.gz (7.0 kB) | File type Source | Python version None | Upload date | Hashes View hashes |