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.2.tar.gz
(11.8 kB
view hashes)
Built Distribution
respx-0.11.2-py2.py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for respx-0.11.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b08186ee5f19eafaf658358f487c5b969aeaf417270beda93d5ed7a33a50d9d |
|
MD5 | 94a9f90946f315456ca84d538f570ec2 |
|
BLAKE2b-256 | e9a002363c0143e5d0bcbcd348c336d5bfac0569ed3f62431aac5b8ffd2051e9 |