[TIP] Using mock library (written by Michael Foord)

Chris Withers chris at simplistix.co.uk
Thu Feb 25 08:35:51 PST 2010


Максим Lacrima wrote:
> So for every test method I always do the same patching! How can I
> avoid this?

This is one of the usecases I covered with my testfixtures package:

http://packages.python.org/testfixtures/mocking.html#manual-usage

...which I wrote specifically to work with Michael's Mock objects :-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the testing-in-python mailing list