Disable httpx requests during a test run
Project description
pytest-httpx-blockage
Package disables requests during pytest execution for HTTPX
If request occurs, RequestBlockageException will be raised.
Installation
- Install
pytest-httpx-blockage(or download from PyPI):
pip install pytest-httpx-blockage
- Pass param
--blockage-httpxto 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
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b61200c525f72dda42723b3e9f424fc13895d4c09706b66347d1dd589dbc26
|
|
| MD5 |
1a6d93f8004bce625f7cd6c4464442ab
|
|
| BLAKE2b-256 |
f220e23d8712b853c075c01746704fafb8fccd8bcea70a47941c7a9faf9d3e51
|