Issue 706590: Adds Mock Object support to unittest.TestCase (original) (raw)
Mock objects can greatly improve unittests (If used in the correct context), especially for code that relis upon resource hungry test (connections to databases, socket servers etc).
The module/patch (to unittest) which I am submitting helps to introspect calls to code whilst maintaing transparency and funcionality with your code.
I had previously written a similar module for my present employers, and myself and fellow XP partners agree that it has made the XP testing cycle consderably easier. Having googol-ed-out alternatives on the web, I have not found a solution that provides the same level of flexibility. (hope that doesn't sound arrogant)
The tests for this module should highlight usage, but i will supply dummy code if this idea is accepted.
If unfamiliar with XP/MockObject ideas, please see : http://www.xprogramming.com/xpmag/virtualMockObject s.htm#N78