Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 922 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 922 Bytes

RESPX

codecov PyPi Version Python Versions

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