From bf372924f07e90ed181e4405b056585b3c5be2f9 Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Fri, 31 May 2024 09:05:28 -0400 Subject: [PATCH] Remove one-line helper function in longrun test --- tests/foreman/longrun/test_inc_updates.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/foreman/longrun/test_inc_updates.py b/tests/foreman/longrun/test_inc_updates.py index d3a8d4663a3..b4a0d2cfccd 100644 --- a/tests/foreman/longrun/test_inc_updates.py +++ b/tests/foreman/longrun/test_inc_updates.py @@ -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( @@ -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