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-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
Built Distribution
Close
Hashes for pytest-httpx-blockage-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0eac96c806ab4c7842716bf13a15aa5846e4ddda87e810c8f0c7d91561e2c6d |
|
MD5 | 52102018979992d628e2de6144569c5a |
|
BLAKE2b-256 | 735c330fa2d41d76f63b66a3f629da3aa04426953f988ccfbeb844f4d72fe836 |
Close
Hashes for pytest_httpx_blockage-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dbeea3005580a01e7a645784d6d12ba21c394c1f4307b7a6d2d382e693eaab7 |
|
MD5 | dc9ffc6098b442d8a58d4f61be21fc39 |
|
BLAKE2b-256 | 851349b0b11e681e10e23fa6ef6a3b872af7df7dc543f7dcd850b4dc37420819 |