[dbus PATCH v2 1/4] tests: Moved `domain` method from test_domain.py to libvirttest.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux