I'm installing a custom urllib2 BaseHandler to deal with HTTP 304 responses (as per here), and this works fine. However, when testing my other methods, I use the method from this SO answer, which works perfectly. However, since the method from the first answer overrides the custom opener, I cant use it for testing. Is there an alternative approach?
Asked
Active
Viewed 289 times