unittest-sandbox provides a sandbox decorator which ensures unit test methods do not make any web/socket requests during test execution.