[ovirt-devel] [vdsm] Using the mock object library (replacing MonkeyPatch)

Edward Haas ehaas at redhat.com
Tue Apr 5 15:01:37 UTC 2016


Hi All,

I would like to propose using the standard mock object library in the VDSM
project.
In python3, mock has been added to the standard library (unittest.mock) and
in previous version it can be used by installing its equivalent stand alone
package (available in el7).

It has some powerful mocking capabilities, covering usages of MonkeyPatch
with a lot more abilities.

Two patches have been posted for review, one introducing mock with a simple
usage and a second one demonstrating how it can replace current MockeyPatch
tests:

https://gerrit.ovirt.org/#/c/55342
https://gerrit.ovirt.org/#/c/55603

Thanks,
Edy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20160405/7ce6e180/attachment-0001.html>


More information about the Devel mailing list