[TIP] Mock objects in testing object composition?

Jim Fulton jim at zope.com
Thu May 17 08:23:32 PDT 2007

On May 17, 2007, at 11:11 AM, Benji York wrote:

> Kumar McMillan wrote:
>> On 4/24/07, Julius Lucks <lucks at fas.harvard.edu> wrote:
>>> Many thanks Benji and Paul.
>>> Looks like simpler is better.  So when are mock objects useful?
>> in my experience, mock objects are useful mostly for depending on  
>> some
>> kind of "external" resource.
> Purists would probably call those "stubs" instead of "mocks", but I  
> see
> what you're saying.

Since this is a testing list, I think it would be helpful to be  
careful about jargon so as not to sow confusion.  I think we should  
distinguish between stubs and mocks, providing the link to:


when there is confusion, assuming of course, that Fowler is correct  
in his characterization. :)


Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org

More information about the testing-in-python mailing list