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

Uploaded Source

File details

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

File metadata

  • Download URL: pytest-httpx-blockage-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for pytest-httpx-blockage-0.0.1.tar.gz
Algorithm Hash digest
SHA256 60b61200c525f72dda42723b3e9f424fc13895d4c09706b66347d1dd589dbc26
MD5 1a6d93f8004bce625f7cd6c4464442ab
BLAKE2b-256 f220e23d8712b853c075c01746704fafb8fccd8bcea70a47941c7a9faf9d3e51

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