Skip to content

Commit

Permalink
Remove one-line helper function in longrun test
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapaioa committed May 31, 2024
1 parent e73be10 commit bf37292
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/foreman/longrun/test_inc_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,6 @@ def host(
return rhel7_contenthost_module


def get_applicable_errata(satellite, repo):
"""Retrieves applicable errata for the given repo"""
return satellite.api.Errata(repository=repo).search(query={'errata_restrict_applicable': True})


@pytest.mark.tier4
@pytest.mark.upgrade
def test_positive_noapply_api(
Expand All @@ -195,8 +190,11 @@ def test_positive_noapply_api(
cvv = versions[-1].read()
cvv.promote(data={'environment_ids': dev_lce.id})

# Get the applicable errata
errata_list = get_applicable_errata(module_target_sat, custom_repo)
# Get the applicable errata for the given repo
errata_list = module_target_sat.api.Errata(repository=custom_repo).search(
query={'errata_restrict_applicable': True}
)

assert len(errata_list) > 0

# Apply incremental update using the first applicable errata
Expand Down

0 comments on commit bf37292

Please sign in to comment.