tests: move make_vm_name to QubesTestCase

This function is often useful also in unit tests, not only integration
tests.
This commit is contained in:
Marek Marczykowski-Górecki 2016-02-11 05:42:08 +01:00 committed by Wojtek Porczyk
parent 5375dce90d
commit 14f31134c0

View File

@ -348,6 +348,13 @@ class QubesTestCase(unittest.TestCase):
except AssertionError as e:
self.fail(str(e))
@staticmethod
def make_vm_name(name, class_teardown=False):
if class_teardown:
return CLSVMPREFIX + name
else:
return VMPREFIX + name
class SystemTestsMixin(object):
"""
@ -431,14 +438,6 @@ class SystemTestsMixin(object):
return
cls.remove_test_vms(xmlpath=CLASS_XMLPATH, prefix=CLSVMPREFIX)
@staticmethod
def make_vm_name(name, class_teardown=False):
if class_teardown:
return CLSVMPREFIX + name
else:
return VMPREFIX + name
@classmethod
def _remove_vm_qubes(cls, vm):
vmname = vm.name