Re: How to test urllib|urllib2-using code?

2009-11-04 Thread Steven D'Aprano
On Wed, 04 Nov 2009 15:06:45 +0100, Lutz Horn wrote: > Hi, > > kj wrote: >> I want to write some tests for code that uses both urllib and urllib2. > > Take a look at the discussion under the title "How can one mock/stub > python module like urllib" at stackoverflow: > > http://stackoverflow.com

Re: How to test urllib|urllib2-using code?

2009-11-04 Thread Lutz Horn
Hi, kj wrote: > I want to write some tests for code that uses both urllib and > urllib2. Take a look at the discussion under the title "How can one mock/stub python module like urllib" at stackoverflow: http://stackoverflow.com/questions/295438/how-can-one-mock-stub-python-module-like-urllib Lu

How to test urllib|urllib2-using code?

2009-11-04 Thread kj
I want to write some tests for code that uses both urllib and urllib2. I would like to be able to run these tests locally. Are there modules to facilitate the writing of such tests (e.g. for setting up a mock web server locally, etc.)? BTW, in the Perl world, one very easy way to learn how to