An experimental nose plugin to block access to external services that you really should not be accessing in your unit tests.
To use:
pip install nose-blockage
Then add the following to your tests:
--with-blockage
Blocking HTTP
By default it whitelists localhost and 127.0.0.1. To change the whitelist:
--http-whitelist=some.site,some.other.site
If the code hits a http connection then instead of completing it will raise a MockHTTPCall exception. Please go and mock your tests appropriately.
Blocking SMTP
By default it whitelists no domains. To change the whitelist:
--smtp-whitelist=some.site
It will raise a MockSMTPCall exception.
Metadata
Release files for nose-blockage 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nose-blockage-0.1.2.tar.gz | 2.8 kB | Without provenance | Details for nose-blockage-0.1.2.tar.gz |
Release files / nose-blockage-0.1.2.tar.gz
| Download URL | nose-blockage-0.1.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7345d9396b3f3c0a658c5cb7dbc799c3a96afa48299d96d9781eaba6bab0b7b0
|
|
BLAKE2b-256 checksum How to use checksums |
14a551ffffed295f34a9c3cb9eb3d99ffb226e84929bbd86c1d92fdc8a599182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nose-blockage 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.