Disable network requests during a test run.
Disable SMTP and HTTP requests during a test run.
The plugin can be installed via pypi:
$ pip install pytest-blockage
To activate the plugin the --blockage parameter should be passed. e.g.:
$ py.test package --blockage
You can whitelist specific hosts:
$ py.test package --blockage --blockage-http-whitelist=some_site --blockage-smtp-whitelist=fake_smtp
All settings can be stored in your pytest file, with the same variable names as the argument names mentioned under usage:
blockage=true blockage-http-whitelist=some_site blockage-smtp-whitelist=fake_smtp
- FIX: sdist package was broken
- FIX: SMTP whitelisting works with python3 as well
- HTTP whitelisting
- SMTP whitelisting
- Added python 3 support
- Initial Release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pytest_blockage-0.2.4-py3-none-any.whl