Change in vdsm[master]: test: Use mock module for testing
phoracek at redhat.com
phoracek at redhat.com
Mon Apr 4 08:13:09 UTC 2016
Petr Horáček has posted comments on this change.
Change subject: test: Use mock module for testing
......................................................................
Patch Set 5: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/55342/5/tests/network/netswitch_test.py
File tests/network/netswitch_test.py:
Line 60: mock_configurator = mock_switch.ConfiguratorClass().__enter__()
Line 61: mock_switch.remove_networks.assert_called_with(self.NET_TEST,
Line 62: self.BOND_TEST,
Line 63: mock_configurator,
Line 64: None, None)
could you add keywords?
Line 65: mock_switch.bonds_setup.assert_called_with(self.BOND_TEST,
Line 66: mock_configurator,
Line 67: None,
Line 68: False)
https://gerrit.ovirt.org/#/c/55342/5/tests/testlib.py
File tests/testlib.py:
Line 39: from unittest import mock
Line 40: mock
Line 41: except ImportError: # py2
Line 42: import mock
Line 43: mock
you can add only one mock after try, except
Line 44:
Line 45: from nose import config
Line 46: from nose import core
Line 47: from nose import result
--
To view, visit https://gerrit.ovirt.org/55342
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c0af7baab7c35a2617bd60a62a0b1534e5f8894
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list