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:
parent
5375dce90d
commit
14f31134c0
@ -348,6 +348,13 @@ class QubesTestCase(unittest.TestCase):
|
|||||||
except AssertionError as e:
|
except AssertionError as e:
|
||||||
self.fail(str(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):
|
class SystemTestsMixin(object):
|
||||||
"""
|
"""
|
||||||
@ -431,14 +438,6 @@ class SystemTestsMixin(object):
|
|||||||
return
|
return
|
||||||
cls.remove_test_vms(xmlpath=CLASS_XMLPATH, prefix=CLSVMPREFIX)
|
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
|
@classmethod
|
||||||
def _remove_vm_qubes(cls, vm):
|
def _remove_vm_qubes(cls, vm):
|
||||||
vmname = vm.name
|
vmname = vm.name
|
||||||
|
Loading…
Reference in New Issue
Block a user