Skip to content

Commit

Permalink
Update regex pattern for installed products report (#16696)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 authored Oct 28, 2024
1 parent 23f3eb9 commit 25f5581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/foreman/api/test_reporttemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ def test_positive_installed_products(
)
assert rake.status == 0, f'Rake call failed with this output:\n({rake.stdout}).'

pattern = re.compile(r'name: "(.*?)".*?cp_product_id: "(.*?)"')
pattern = re.compile(r'name: "(.*?)"\s*.*?\s*cp_product_id: "(.*?)"')
matches = pattern.findall(rake.stdout)
products = [f'{match[0]} ({match[1]})' for match in matches]
assert len(products), 'No installed products to compare.'
Expand Down

0 comments on commit 25f5581

Please sign in to comment.