[TIP] Stubbing out httplib2.Http.request
Chris Withers
chris at simplistix.co.uk
Sun Jul 17 02:26:40 PDT 2011
On 12/07/2011 19:42, Seth Buntin wrote:
> I am having one heck of a time stubbing out Http.request from httplib2.
> I currently have five test cases and it takes 13 seconds, even though my
> return_value of Http.request is correct for some reason it seems that
> the request function is still running.
>
> Here is the gist of my test code:
>
> https://gist.github.com/5ba6bac1d4efd5cb903b
>
> I'm using Michael Foord's mock library. Can anyone help me with this or
> point me in the right direction?
https://github.com/gabrielfalcao/HTTPretty#readme
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the testing-in-python
mailing list