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.13.0.tar.gz
(11.8 kB
view hashes)
Built Distribution
respx-0.13.0-py2.py3-none-any.whl
(18.8 kB
view hashes)
Close
Hashes for respx-0.13.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 209eb9a8ec02e3c62d7a46ba8b57e94bfc5eba419f7a18badcb6fc95e5a6f451 |
|
MD5 | 73e3d9eb6e48c7079af990fc72e5e17f |
|
BLAKE2b-256 | 875fe20fcce0c4af428dd2ff694690074f8c0f893082378ca36fd4067a0e5152 |