[Openstack] mock, mox, stubs, fakes, etc

Joseph Heck heckj at mac.com
Sun Apr 8 22:47:34 UTC 2012


Thanks Lorin! That helps me quite a bit.

-joe

On Apr 8, 2012, at 3:20 PM, Lorin Hochstein wrote:

> mox and mock are two competing Python libraries for defining mock objects for unit tests. I think they're basically equivalent in terms of what you can do with them, but they use different styles: In mox the assertions are written before the code under test, and in mock the assertions are written after the code under test. 
> 
> I personally think mock is more Pythonic, and it's what I use on other projects. Mox is a port of a Java library, and mock was (AFAIK) written specifically for Python. Also, Mock has been accepted into the Python 3.3(?) standard library as a submodule of unit tests. However, mox has been the main mocking library used in Nova unit test for as long as I have been familiar with the code.
> 
> Take care,
> 
> Lorin
> --
> Lorin Hochstein
> Lead Architect - Cloud Services
> Nimbis Services, Inc.
> www.nimbisservices.com
> 
> 
> 
> 
> 
> On Apr 8, 2012, at 4:06 PM, Joseph Heck wrote:
> 
>> Poking around through all various mechanisms we have to test and verify OpenStack - does anyone have a concise writeup on the various tools and techniques that we're using? 
>> 
>> I'm not familiar with the "stubs" or "mock" libraries, and a little familiar with mox.
>> 
>> Is anyone who is familiar with them all willing to take a stab at outlining where they're individually most effective and useful?
>> 
>> -joe
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack at lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120408/3021c870/attachment.html>


More information about the Openstack mailing list