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.15.0.tar.gz
(18.1 kB
view hashes)
Built Distribution
respx-0.15.0-py2.py3-none-any.whl
(24.8 kB
view hashes)
Close
Hashes for respx-0.15.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99877a3053808b8af1f4434a446a81f03240eefff71a019f0c12cc1f6763faf4 |
|
MD5 | f32aca8ae4c8d3dc15ac740d04faccc9 |
|
BLAKE2b-256 | 163367718b1b438873ed9fb2bdf591c5f66d96113c7f6c5e4e737429b356ffb0 |