Skip to main content

nose-detecthttp

A nose plugin that can detect tests making external http calls. Example output:

$ nosetests -v --with-detecthttp myapp/
test_that_makes_request ... ok
test_with_no_request ... ok

======================================================================
FAIL: Tests made external http calls
----------------------------------------------------------------------
- myapp.tests.AppTest:

    test_that_makes_request:
      GET http://example.com

----------------------------------------------------------------------
Ran 2 tests in 0.001s

FAILED (failures=1)

Sometimes, you want to ignore hosts besides localhost. For example, you might be running tests in a containerized environment where dynamodb has the hostname dynamodb and mysql has the hostname mysql. To ignore these hosts, the –vcr-ignore-host option:

nosetests -v --with-detecthttp --vcr-ignore-host=www.example.com app/
test_one (app.tests.ExternalTestCase) ... ok
test_two (app.tests.ExternalTestCase) ... ok

----------------------------------------------------------------------
Ran 2 tests in 0.042s

OK

Under the hood, this wraps every test in a separate VCR.py cassette. Since VCR.py’s hooks are in the stdlib, this approach won’t detect requests made with clients like PycURL.

History

0.1.1

released 2014-11-24

  • initial release

Metadata

Release files for nose-detecthttp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nose-detecthttp 0.2.0
File Size Uploaded Provenance
nose-detecthttp-0.2.0.tar.gz 4.9 kB Without provenance Details

Release files / nose-detecthttp-0.2.0.tar.gz

Download URL nose-detecthttp-0.2.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1285c4fdc6bbc9d7b27a4a36b9d624f0cdfe9dbfecaa4896cd75c7e773cb4c07
BLAKE2b-256 checksum
How to use checksums
b116bdc9a5a8e20c3de7f76db889327f17e508ef614d0def7ba44221b3f0ab15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for nose-detecthttp 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page