>From there it can be reused from test_connect.py. Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> --- test/libvirttest.py | 5 +++++ test/test_domain.py | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/libvirttest.py b/test/libvirttest.py index 23fe536..c4dc96f 100644 --- a/test/libvirttest.py +++ b/test/libvirttest.py @@ -65,3 +65,8 @@ class BaseTestClass(): self.loop = GLib.MainLoop() GLib.timeout_add(1000, timeout) self.loop.run() + + def domain(self): + path = self.connect.ListDomains(0)[0] + obj = self.bus.get_object('org.libvirt', path) + return obj, dbus.Interface(obj, 'org.libvirt.Domain') diff --git a/test/test_domain.py b/test/test_domain.py index 73737d7..e617b1b 100755 --- a/test/test_domain.py +++ b/test/test_domain.py @@ -6,11 +6,6 @@ import libvirttest DBUS_EXCEPTION_MISSING_FUNCTION = 'this function is not supported by the connection driver' class TestDomain(libvirttest.BaseTestClass): - def domain(self): - path = self.connect.ListDomains(0)[0] - obj = self.bus.get_object('org.libvirt', path) - return obj, dbus.Interface(obj, 'org.libvirt.Domain') - def test_api(self): obj, domain = self.domain() -- 2.15.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list