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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
respx-0.8.tar.gz
(7.0 kB
view hashes)
Built Distribution
respx-0.8-py3-none-any.whl
(14.5 kB
view hashes)