Francesco Romani has uploaded a new change for review. Change subject: tests: add mocking in deviceTests ......................................................................
tests: add mocking in deviceTests add mocking to make sure not to query libvirt in this flow. We don't actually care in this test about the fine details of the network, so this is safe. Change-Id: I18ac1ea95c2f3c79feb348f2495854f79a650cb2 Signed-off-by: Francesco Romani <[email protected]> --- M tests/deviceTests.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/59876/1 diff --git a/tests/deviceTests.py b/tests/deviceTests.py index e0cf38d..bb80f9c 100644 --- a/tests/deviceTests.py +++ b/tests/deviceTests.py @@ -606,9 +606,11 @@ vmConf.update(self.conf) with fake.VM(vmConf) as testvm: - dev = (testvm.getConfGraphics() if isLegacy - else vmConf['devices'])[0] - graph = vmdevices.graphics.Graphics(vmConf, self.log, **dev) + dev = vmConf['devices'][0] + with MonkeyPatchScope([ + (vmdevices.graphics, '_getNetworkIp', lambda _: '0') + ]): + graph = vmdevices.graphics.Graphics(vmConf, self.log, **dev) self.assertXMLEqual(graph.getXML().toxml(), xml) if graph.device == 'spice': -- To view, visit https://gerrit.ovirt.org/59876 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18ac1ea95c2f3c79feb348f2495854f79a650cb2 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
