diff --git a/tests/foreman/api/test_repository.py b/tests/foreman/api/test_repository.py index f42c33f86c7..ac43bef83f8 100644 --- a/tests/foreman/api/test_repository.py +++ b/tests/foreman/api/test_repository.py @@ -50,12 +50,6 @@ def repo_options_custom_product(request, module_org, module_target_sat): return options -@pytest.fixture -def env(module_org, module_target_sat): - """Create a new puppet environment.""" - return module_target_sat.api.Environment(organization=[module_org]).create() - - @pytest.fixture def repo(repo_options, module_target_sat): """Create a new repository.""" @@ -2098,7 +2092,7 @@ class TestSRPMRepository: @pytest.mark.upgrade @pytest.mark.tier2 def test_positive_srpm_upload_publish_promote_cv( - self, module_org, env, repo, module_target_sat + self, module_org, module_lce, repo, module_target_sat ): """Upload SRPM to repository, add repository to content view and publish, promote content view @@ -2132,7 +2126,6 @@ def test_positive_srpm_upload_publish_promote_cv( @pytest.mark.upgrade @pytest.mark.tier2 - @pytest.mark.skip('Uses deprecated SRPM repository') @pytest.mark.skipif( (not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url' ) @@ -2141,7 +2134,7 @@ def test_positive_srpm_upload_publish_promote_cv( **datafactory.parametrized({'fake_srpm': {'url': repo_constants.FAKE_YUM_SRPM_REPO}}), indirect=True, ) - def test_positive_repo_sync_publish_promote_cv(self, module_org, env, repo, target_sat): + def test_positive_repo_sync_publish_promote_cv(self, module_org, module_lce, repo, target_sat): """Synchronize repository with SRPMs, add repository to content view and publish, promote content view @@ -2165,8 +2158,8 @@ def test_positive_repo_sync_publish_promote_cv(self, module_org, env, repo, targ >= 3 ) - cv.version[0].promote(data={'environment_ids': env.id, 'force': False}) - assert len(target_sat.api.Srpms().search(query={'environment_id': env.id})) == 3 + cv.version[0].promote(data={'environment_ids': module_lce.id, 'force': False}) + assert len(target_sat.api.Srpms().search(query={'environment_id': module_lce.id})) >= 3 class TestSRPMRepositoryIgnoreContent: