tests: make PEP8 and pylint happy
This commit is contained in:
parent
056d7474c3
commit
7ae8b86a6e
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public License along
|
# You should have received a copy of the GNU Lesser General Public License along
|
||||||
# with this program; if not, see <http://www.gnu.org/licenses/>.
|
# with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
import unittest
|
|
||||||
import qubesadmin.tests
|
import qubesadmin.tests
|
||||||
import qubesadmin.utils
|
import qubesadmin.utils
|
||||||
|
|
||||||
@ -63,7 +63,8 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
|
|||||||
b'2\0QubesNoSuchPropertyError\0\0invalid property\0'
|
b'2\0QubesNoSuchPropertyError\0\0invalid property\0'
|
||||||
|
|
||||||
def test_00_only_global(self):
|
def test_00_only_global(self):
|
||||||
result = qubesadmin.utils.vm_dependencies(self.app, self.app.domains['vm2'])
|
result = qubesadmin.utils.vm_dependencies(self.app,
|
||||||
|
self.app.domains['vm2'])
|
||||||
|
|
||||||
self.assertListEqual(result,
|
self.assertListEqual(result,
|
||||||
[(None, prop) for prop in self.global_properties],
|
[(None, prop) for prop in self.global_properties],
|
||||||
@ -77,11 +78,13 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
|
|||||||
set(result),
|
set(result),
|
||||||
set([(vm, prop) for vm in self.vms for prop in self.vm_properties
|
set([(vm, prop) for vm in self.vms for prop in self.vm_properties
|
||||||
if (not vm.startswith('template')
|
if (not vm.startswith('template')
|
||||||
or not prop.startswith('template')) and vm != 'template1']),
|
or not prop.startswith(
|
||||||
|
'template')) and vm != 'template1']),
|
||||||
"Incorrect VM properties listed.")
|
"Incorrect VM properties listed.")
|
||||||
|
|
||||||
def test_02_empty(self):
|
def test_02_empty(self):
|
||||||
result = qubesadmin.utils.vm_dependencies(self.app, self.app.domains['vm1'])
|
result = qubesadmin.utils.vm_dependencies(self.app,
|
||||||
|
self.app.domains['vm1'])
|
||||||
|
|
||||||
self.assertListEqual(result, [], "Incorrect use found.")
|
self.assertListEqual(result, [], "Incorrect use found.")
|
||||||
|
|
||||||
@ -89,7 +92,8 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
|
|||||||
self.app.expected_calls[
|
self.app.expected_calls[
|
||||||
('dom0', 'admin.property.Get', 'default_dispvm', None)] = b''
|
('dom0', 'admin.property.Get', 'default_dispvm', None)] = b''
|
||||||
|
|
||||||
result = qubesadmin.utils.vm_dependencies(self.app, self.app.domains['vm1'])
|
result = qubesadmin.utils.vm_dependencies(self.app,
|
||||||
|
self.app.domains['vm1'])
|
||||||
|
|
||||||
self.assertListEqual(result, [], "Incorrect use found.")
|
self.assertListEqual(result, [], "Incorrect use found.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user