Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A nose plugin to detect tests making http calls.

Project Description

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
Release History

Release History

This version
History Node

0.2.0

History Node

0.1.3

History Node

0.1.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nose-detecthttp-0.2.0.tar.gz (4.9 kB) Copy SHA256 Checksum SHA256 Source Aug 15, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting