[Web-SIG] Dealing with urllib, urllib2, and urlparse
ianb at colorstudy.com
Fri Feb 22 23:21:39 CET 2008
Joe Gregorio wrote:
> On Fri, Feb 22, 2008 at 2:09 PM, Ian Bicking <ianb at colorstudy.com> wrote:
>> I guess this is a test-related feature request: something that would be
>> nice, and that I don't believe httplib2 specifically allows (though
>> maybe I am unaware of it) is a clear/documented way to mock http calls.
>> wsgi_intercept provides this in a kind of general way, and includes
>> some httplib2 support, but direct support in httplib2 (and the stdlib)
>> would be very nice, and I think encourage people to do better testing.
> I have a MockHttp in another project that I use for testing code
> that uses httplib2, is this what you'd like to see included in
> httplib2 itself?
Yes, more or less. Only taking from files on disk is less flexible than
a WSGI application, so that more general interface would also be nice
(though having both would be good too).
More information about the Web-SIG