[libvirt] [dbus PATCH 3/4] tests: Don't open-code node_device_create()

Andrea Bolognani abologna at redhat.com
Fri Jul 27 12:37:40 UTC 2018


The fixture is pretty trivial right now, so open-coding
it is not a big deal; however, we're going to add more
logic to it soon and we definitely don't want to end up
having to worry about duplicated code.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 tests/test_nodedev.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/test_nodedev.py b/tests/test_nodedev.py
index c68cb66..ce70dfc 100755
--- a/tests/test_nodedev.py
+++ b/tests/test_nodedev.py
@@ -3,7 +3,6 @@
 import dbus
 import libvirttest
 import pytest
-import xmldata
 
 
 class TestNodeDevice(libvirttest.BaseTestClass):
@@ -30,7 +29,7 @@ class TestNodeDevice(libvirttest.BaseTestClass):
 
         self.connect.connect_to_signal('NodeDeviceEvent', node_device_created)
 
-        path = self.connect.NodeDeviceCreateXML(xmldata.minimal_node_device_xml, 0)
+        path = self.node_device_create()
         assert isinstance(path, dbus.ObjectPath)
 
         self.main_loop()
-- 
2.17.1




More information about the libvir-list mailing list