Skip to main content

A utility for mocking out the Python HTTPX library.

Project description

RESPX

codecov PyPi Version Python Versions

A utility for mocking out the Python HTTPX library.

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


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.10.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

respx-0.10.1-py2.py3-none-any.whl (18.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file respx-0.10.1.tar.gz.

File metadata

  • Download URL: respx-0.10.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.0

File hashes

Hashes for respx-0.10.1.tar.gz
Algorithm Hash digest
SHA256 190d1fb5bddaf6fcc1319a3cdfbd682c77d7167017b3283cbe79b8fb74927135
MD5 aa9449854a65a302b8973922d918d82a
BLAKE2b-256 8f78e53731416375f81a813be5536763c267796034b4ee7fd060028a595d7414

See more details on using hashes here.

File details

Details for the file respx-0.10.1-py2.py3-none-any.whl.

File metadata

  • Download URL: respx-0.10.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.0

File hashes

Hashes for respx-0.10.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 43aca802e0fd0c964865b07f101943e7b5902ea070ec94cf8e84a39db8729b06
MD5 919e77a48c75fe6086ac2b8bef679349
BLAKE2b-256 55881a8a5f5f4cf45c8cb80beb57dd6845cd1dce9aa3ff6a3bff3762b61430a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page