From 534de9bc1c0ced1cb5a5ef3b2d07ebd6a9e8ea1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 26 Jan 2020 06:43:29 +0100 Subject: [PATCH] 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(). --- qubes/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/tests/__init__.py b/qubes/tests/__init__.py index c8a4df4c..489802e5 100644 --- a/qubes/tests/__init__.py +++ b/qubes/tests/__init__.py @@ -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(