Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
tests/test_connect.py | 2 +-
tests/test_domain.py | 5 +++--
tests/test_interface.py | 11 ++++++-----
tests/test_network.py | 8 ++++----
tests/test_storage.py | 1 +
5 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/tests/test_connect.py b/tests/test_connect.py
index bb2d767..f481356 100755
--- a/tests/test_connect.py
+++ b/tests/test_connect.py
@@ -96,7 +96,7 @@ class TestConnect(libvirttest.BaseTestClass):
def test_connect_interface_lookup_by_property(self, lookup_method_name, lookup_item,
interface_create):
"""Parameterized test for all InterfaceLookupBy* API calls of
Connect interface
"""
- original_path,_ = interface_create
+ original_path, _ = interface_create
obj = self.bus.get_object('org.libvirt', original_path)
prop = obj.Get('org.libvirt.Interface', lookup_item,
dbus_interface=dbus.PROPERTIES_IFACE)
path = getattr(self.connect, lookup_method_name)(prop)
diff --git a/tests/test_domain.py b/tests/test_domain.py
index b9a6d33..96b282c 100755
--- a/tests/test_domain.py
+++ b/tests/test_domain.py
@@ -5,6 +5,7 @@ import libvirttest
DBUS_EXCEPTION_MISSING_FUNCTION = 'this function is not supported by the connection
driver'
+
class TestDomain(libvirttest.BaseTestClass):
def test_api(self):
obj, domain = self.get_test_domain()
@@ -153,8 +154,8 @@ class TestDomain(libvirttest.BaseTestClass):
def test_domain_vcpu_pin_info(self):
obj, domain = self.get_test_domain()
pinInfo_expected = [
- [ True, True, True, True, True, True, True, True ],
- [ True, True, True, True, True, True, True, True ]
+ [True, True, True, True, True, True, True, True],
+ [True, True, True, True, True, True, True, True]
]
pinInfo = domain.GetVcpuPinInfo(0)
assert pinInfo == pinInfo_expected
diff --git a/tests/test_interface.py b/tests/test_interface.py
index bcda8d5..38a1cc1 100755
--- a/tests/test_interface.py
+++ b/tests/test_interface.py
@@ -4,33 +4,34 @@ import dbus
import libvirttest
import pytest
+
@pytest.mark.usefixtures("interface_create")
class TestInterface(libvirttest.BaseTestClass):
""" Tests for methods and properties of the Interface interface
"""
def test_interface_undefine(self, interface_create):
- _,interface_obj = interface_create
+ _, interface_obj = interface_create
interface_obj.Destroy(0)
interface_obj.Undefine()
def test_interface_destroy(self, interface_create):
- _,interface_obj = interface_create
+ _, interface_obj = interface_create
interface_obj.Destroy(0)
def test_interface_create(self, interface_create):
- _,interface_obj = interface_create
+ _, interface_obj = interface_create
interface_obj.Destroy(0)
interface_obj.Create(0)
def test_interface_get_xml_description(self, interface_create):
- _,interface_obj = interface_create
+ _, interface_obj = interface_create
assert isinstance(interface_obj.GetXMLDesc(0), dbus.String)
def test_interface_properties_type(self, interface_create):
""" Ensure correct return type for Interface properties
"""
- test_interface_path,_ = interface_create
+ test_interface_path, _ = interface_create
obj = self.bus.get_object('org.libvirt', test_interface_path)
props = obj.GetAll('org.libvirt.Interface',
dbus_interface=dbus.PROPERTIES_IFACE)
assert isinstance(props['Name'], dbus.String)
diff --git a/tests/test_network.py b/tests/test_network.py
index 11418cb..2e3a8f0 100755
--- a/tests/test_network.py
+++ b/tests/test_network.py
@@ -25,7 +25,7 @@ class TestNetwork(libvirttest.BaseTestClass):
assert isinstance(props['UUID'], dbus.String)
def test_network_autostart(self):
- _,test_network = self.get_test_network()
+ _, test_network = self.get_test_network()
interface_obj = dbus.Interface(test_network, 'org.libvirt.Network')
autostart_expected = True
interface_obj.Set('org.libvirt.Network', 'Autostart',
autostart_expected, dbus_interface=dbus.PROPERTIES_IFACE)
@@ -41,7 +41,7 @@ class TestNetwork(libvirttest.BaseTestClass):
self.connect.connect_to_signal('NetworkEvent', domain_started)
- _,test_network = self.get_test_network()
+ _, test_network = self.get_test_network()
interface_obj = dbus.Interface(test_network, 'org.libvirt.Network')
interface_obj.Destroy()
interface_obj.Create()
@@ -64,7 +64,7 @@ class TestNetwork(libvirttest.BaseTestClass):
self.main_loop()
def test_network_get_xml_description(self):
- _,test_network = self.get_test_network()
+ _, test_network = self.get_test_network()
interface_obj = dbus.Interface(test_network, 'org.libvirt.Network')
assert isinstance(interface_obj.GetXMLDesc(0), dbus.String)
@@ -77,7 +77,7 @@ class TestNetwork(libvirttest.BaseTestClass):
self.connect.connect_to_signal('NetworkEvent', domain_undefined)
- _,test_network = self.get_test_network()
+ _, test_network = self.get_test_network()
interface_obj = dbus.Interface(test_network, 'org.libvirt.Network')
interface_obj.Destroy()
interface_obj.Undefine()
diff --git a/tests/test_storage.py b/tests/test_storage.py
index 63ecf91..631e107 100755
--- a/tests/test_storage.py
+++ b/tests/test_storage.py
@@ -4,6 +4,7 @@ import dbus
import libvirttest
import pytest
+
class TestStoragePool(libvirttest.BaseTestClass):
def test_storage_pool_autostart(self):
_, test_storage_pool = self.get_test_storage_pool()
--
2.17.1