mocktest
I’ve been working on this a little while now. At work, I use ruby. It has its good points, but my language of choice is still python. I am, however, blown away by rspec. So I’ve tried to bring some of its features into python (namely and should_receive matchers).
Thus was born mocktest. The readme has all the examples you should need to start using it in your own testing code.
It’s also available from the cheese shop, which means you can just run easy_install mocktest
to install it on your system.
I should note that this code builds upon the excellent Mock library by Michael Foord.