Skip to main content

Disable httpx requests during a test run

Project description

pytest-httpx-blockage

pypi versions

Package disables requests during pytest execution for HTTPX

If request occurs, RequestBlockageException will be raised.

Installation

pip install pytest-httpx-blockage
  • Pass param --blockage-httpx to enable blockage.

Configuration

By default, blockage will be disabled in tests marked as integration. You can override it using --disable-blockage-mark=new_mark.

All settings can be stored in your .cfg file, with the same variable names as the argument names mentioned under usage:

blockage-httpx=true
disable-blockage-mark=new_mark

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

pytest-httpx-blockage-0.0.8.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

pytest_httpx_blockage-0.0.8-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pytest-httpx-blockage-0.0.8.tar.gz.

File metadata

  • Download URL: pytest-httpx-blockage-0.0.8.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for pytest-httpx-blockage-0.0.8.tar.gz
Algorithm Hash digest
SHA256 c0eac96c806ab4c7842716bf13a15aa5846e4ddda87e810c8f0c7d91561e2c6d
MD5 52102018979992d628e2de6144569c5a
BLAKE2b-256 735c330fa2d41d76f63b66a3f629da3aa04426953f988ccfbeb844f4d72fe836

See more details on using hashes here.

File details

Details for the file pytest_httpx_blockage-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_httpx_blockage-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbeea3005580a01e7a645784d6d12ba21c394c1f4307b7a6d2d382e693eaab7
MD5 dc9ffc6098b442d8a58d4f61be21fc39
BLAKE2b-256 851349b0b11e681e10e23fa6ef6a3b872af7df7dc543f7dcd850b4dc37420819

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