Edward Haas has posted comments on this change. Change subject: test: Use mock module for testing ......................................................................
Patch Set 6: (1 comment) https://gerrit.ovirt.org/#/c/55342/6/tests/network/netswitch_test.py File tests/network/netswitch_test.py: Line 47: @mock.patch('vdsm.network.netswitch.libvirtNets2vdsm') Line 48: @mock.patch('vdsm.network.netswitch.libvirt_nets') Line 49: @mock.patch('vdsm.network.netswitch.legacy_switch') Line 50: def test_setup(self, mock_switch, mock_libvirt_nets, mock_libvirtNets2vdsm, Line 51: mock_netinfo_get, mock_CachingNetInfo, mock_connectivity): > Can you run this test with py.test? I ran it and it passed: PYTHONPATH="./lib:$PYTHONPATH" py.test tests/network/netswitch_test.py =========== test session starts =========== platform linux2 -- Python 2.7.5 -- pytest-2.3.5 collected 2 items tests/network/netswitch_test.py .. ============= 2 passed in 0.11 seconds ============= Line 52: Line 53: mock_libvirt_nets.return_value = None Line 54: mock_libvirtNets2vdsm.return_value = None Line 55: mock_netinfo_get.return_value = None -- 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: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Edward Haas <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Ondřej Svoboda <[email protected]> Gerrit-Reviewer: Petr Horáček <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Sandro Bonazzola <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
