[Web-SIG] Dealing with urllib, urllib2, and urlparse
Ian Bicking
ianb at colorstudy.com
Fri Feb 22 20:09:41 CET 2008
Joe Gregorio wrote:
>> * Thorough unit tests using unittest or doctest.
>
> Done.
>
> http://httplib2.googlecode.com/svn/trunk/httplib2test.py
>
> Many unit tests done in unittest. They fall into
> two categories, those that run locally and those
> that run against a set of URIs on the web. Is there
> a stdlib way of segregating those tests? All the
> code for the resources is also checked into
> subversion:
>
> http://httplib2.googlecode.com/svn/trunk/test/
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.
Ian
More information about the Web-SIG
mailing list