diff --git a/plinth/tests/functional/__init__.py b/plinth/tests/functional/__init__.py index 7b109b9d8..9a5b6394f 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -763,7 +763,8 @@ class BaseAppTests: def fixture_disable_after_tests(self, session_browser): """Disable the app after running tests.""" yield - if self.disable_after_tests: + if self.disable_after_tests and is_installed(session_browser, + self.app_name): app_disable(session_browser, self.app_name) @pytest.fixture(autouse=True, name='background')