A utility for mocking out the Python HTTPX and HTTP Core libraries.
Project description
RESPX
A utility for mocking out the Python HTTPX and HTTP Core libraries.
Documentation
Full documentation is available at lundberg.github.io/respx
QuickStart
import httpx
import respx
@respx.mock
def test_something():
request = respx.post("https://foo.bar/baz/", status_code=201)
response = httpx.post("https://foo.bar/baz/")
assert request.called
assert response.status_code == 201
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.11.3.tar.gz
(11.8 kB
view hashes)
Built Distribution
respx-0.11.3-py2.py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for respx-0.11.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d21cec2b96b381de684917475201c5a5f39dfd0c8e5d2c8ff5181be71671f80 |
|
MD5 | 46239844cd7bb405ef1305bb94c4f216 |
|
BLAKE2b-256 | d14da742eb41e0def092b9ce9a4734967df5b70e856d9b9ef74d68f28d3f4b95 |