I\'m using Mechanize to spider some websites. While spidering I save pages to files that I use later with Fakeweb to do tests.
I really like the way fakeweb in Ruby can be used to fake http requests when testing. Is there a开发者_如何学运维 similar library or an alternative for Python?See also How can one mock/stub python mod