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.12.0.tar.gz
(11.8 kB
view hashes)
Built Distribution
respx-0.12.0-py2.py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for respx-0.12.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 401eb97c8a236c8a8a03d3d2c19996c8f30c1c0d4fbd970e3f1ed448436671c0 |
|
MD5 | 7c7687b474d5b14062437b71a18e719f |
|
BLAKE2b-256 | 2c96d9639b3dac10665537c1913c0740dad2ae7cfe113eaeb8d61960e06e5dbd |