[openstack-dev] Nova: add mock as a test dependency

Mate Lakat mate.lakat at citrix.com
Thu Oct 25 12:19:41 UTC 2012


Hi All,

What do you guys think about adding mock==1.0.0 to the nova test
dependencies? I think it is already added to quantum.

Some highlights from http://www.voidspace.org.uk/python/mock/index.html
- mock is now part of the Python standard library, available as
  unittest.mock in Python 3.3 onwards.
- Mock is based on the ‘action -> assertion’ pattern instead of ‘record
  -> replay’ used by many mocking frameworks.
- mock.Mock() is capable of being used in most of the different roles
  described by Fowler, except (annoyingly / frustratingly / ironically)
  a Mock itself!

So mox is still there to do the record, replay job, if needed.

Review is here:
https://review.openstack.org/14820

Mate



More information about the OpenStack-dev mailing list