astropy/astroquery — pull request #200 by keflavich (2013-09-04 07:15:28+00:00)
Title: Monkeypatch socket when not using remote_data so that no internet connection is *available*

If we prevent any remote connection from being created when testing without remote data, we can test that the request monkeypatches are actually working. This will be a useful consistency enforcement.

See
http://stackoverflow.com/questions/18601828/python-block-network-connections-for-testing-purposes/18601897 for a partial implementation.