tests: fix cleanup before test

If any test-* VMs remains from previous test run, there are removed
before test. self.app doesn't exist at this point, so don't require it
in self.remove_vms().
This commit is contained in:
Marek Marczykowski-Górecki 2020-01-26 06:43:29 +01:00
parent e6e4908e71
commit 534de9bc1c
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -914,7 +914,7 @@ class SystemTestCase(QubesTestCase):
# workaround for https://phabricator.whonix.org/T930
# unregister all the VMs from sys-whonix, otherwise it will start them
# again (possibly in further test)
if 'whonix' in self.app.default_netvm.name:
if hasattr(self, 'app') and 'whonix' in self.app.default_netvm.name:
for vm in vms:
try:
self.loop.run_until_complete(