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