From 4f7a38d97c9579dd2907b356903c7979aa550e85 Mon Sep 17 00:00:00 2001 From: Matyas Strelec Date: Thu, 12 Oct 2023 12:17:53 +0200 Subject: [PATCH] update regex to match if there's multiple packages --- tests/foreman/destructive/test_packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/foreman/destructive/test_packages.py b/tests/foreman/destructive/test_packages.py index a67e8ae95a8..05c44bf1501 100644 --- a/tests/foreman/destructive/test_packages.py +++ b/tests/foreman/destructive/test_packages.py @@ -53,7 +53,7 @@ def test_positive_all_packages_update(target_sat): result = target_sat.cli.Packages.check_update() # Regex to match if there are packages available to update # Matches lines like '\n\nwalrus.noarch 5.21-1 custom_repo\n' - pattern = '(\\s+)\\n\\n(\\S+)(\\s+)(\\S+)(\\s+)(\\S+)\\n(\\s+)' + pattern = '(\\n){1,2}(\\S+)(\\s+)(\\S+)(\\s+)(\\S+)(\\n)' matches = re.search(pattern, result.stdout) assert matches is None # No packages available to update assert 'FAIL' not in result.stdout