No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Andy McKay
Andy McKay Merge pull request #3 from mboelens91/python3
Make it work for python3
Latest commit bb93561 Oct 7, 2015
Failed to load latest commit information.
blockage Make it work for python3 Jul 28, 2015
LICENSE.rst first commit Nov 14, 2012 don't forget the manifest Nov 14, 2012
README.rst Add django-nose usage docs Feb 27, 2013 bump for release Nov 16, 2012


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:


If you use django-nose then add this to your Django settings to activate it:

    # ...

Blocking HTTP

By default it whitelists localhost and To change the whitelist:,

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:

It will raise a MockSMTPCall exception.