Package disables requests during pytest execution for HTTPX
If request occurs, RequestBlockageException
will be raised.
- Install
pytest-httpx-blockage
(or download from PyPI):
pip install pytest-httpx-blockage
- Pass param
--blockage-httpx
to enable blockage.
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