From 19d99296504a88464aee40d0ba2f8b160aa46a2a Mon Sep 17 00:00:00 2001 From: Vladimir Sedmik Date: Mon, 27 May 2024 16:09:17 +0200 Subject: [PATCH] Reorder finalizers in CV upgrade test --- tests/upgrades/test_contentview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/upgrades/test_contentview.py b/tests/upgrades/test_contentview.py index 537ea003e03..f0911f34bf4 100644 --- a/tests/upgrades/test_contentview.py +++ b/tests/upgrades/test_contentview.py @@ -88,7 +88,6 @@ def test_cv_postupgrade_scenario(self, request, target_sat, pre_upgrade_data): cv = target_sat.api.ContentView(organization=org.id).search( query={'search': f'name="{cv_name}"'} )[0] - request.addfinalizer(cv.delete) yum_repo = target_sat.api.Repository(organization=org.id).search( query={'search': f'name="{pre_test_name}_yum_repo"'} )[0] @@ -97,6 +96,7 @@ def test_cv_postupgrade_scenario(self, request, target_sat, pre_upgrade_data): query={'search': f'name="{pre_test_name}_file_repo"'} )[0] request.addfinalizer(file_repo.delete) + request.addfinalizer(cv.delete) # the order matters cv.repository = [] cv.update(['repository']) assert len(cv.read_json()['repositories']) == 0