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.1.tar.gz
(11.5 kB
view hashes)
Built Distribution
respx-0.11.1-py2.py3-none-any.whl
(18.8 kB
view hashes)
Close
Hashes for respx-0.11.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb5fcefca881df325212e45ee116b75697a2606c2a7cd6ecc143c21a8201d1b1 |
|
MD5 | 738d2fd20bdafdeab4f4578b693b2418 |
|
BLAKE2b-256 | 6d401d35a807f1acf322d5898cbd9cdb47532df543d160b6cb124668d5cd612f |