[openstack-dev] [nova] Do we have some guidelines for mock, stub, mox when writing unit test?

Jay Lau jay.lau.513 at gmail.com
Mon Nov 11 17:00:56 UTC 2013


Got it. Thanks.

Jay


2013/11/11 Davanum Srinivas <davanum at gmail.com>

> Feedback from some of the Nova sessions were,
>
> "If you are writing new tests, try to use mock."
> "Writing new tests to cover more code (esp drivers) is more preferable
> to any effort that just converts from mox to mock"
>
> -- dims
>
> On Sun, Nov 10, 2013 at 11:25 PM, Noorul Islam K M <noorul at noorul.com>
> wrote:
> > Jay Lau <jay.lau.513 at gmail.com> writes:
> >
> >> Hi,
> >>
> >> I noticed that we are now using mock, mox and stub for unit test, just
> >> curious do we have any guidelines for this, in which condition shall we
> use
> >> mock, mox or stub?
> >>
> >
> > There is already a blueprint [1] in Nova project to replace Mox with
> mock.
> >
> > Also it has a link to ML thread [2].
> >
> > Regards,
> > Noorul
> >
> > [1] https://blueprints.launchpad.net/nova/+spec/mox-to-mock-conversion
> > [2]
> http://lists.openstack.org/pipermail/openstack-dev/2013-July/012484.html
> >
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131112/8b7b6c4f/attachment.html>


More information about the OpenStack-dev mailing list