You might be able to address @astrofrog's concern (that this disables local socket testing) by instead monkey patching `socket.connect` and checking for localhost (that's an untested theory, of course).