From 4966bd205982c89c2045294add5ce983d6271cfa Mon Sep 17 00:00:00 2001 From: vsedmik <46570670+vsedmik@users.noreply.github.com> Date: Wed, 22 May 2024 15:25:50 +0200 Subject: [PATCH] Fix assertions in file repo tests (#15138) (cherry picked from commit fe65df5f0ecdd1276cd66fa9551f6d0eec6cdff3) --- tests/foreman/cli/test_repository.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/foreman/cli/test_repository.py b/tests/foreman/cli/test_repository.py index 364315ba197..fc773ea78d7 100644 --- a/tests/foreman/cli/test_repository.py +++ b/tests/foreman/cli/test_repository.py @@ -1729,7 +1729,7 @@ def test_positive_upload_remove_srpm_content(self, repo, target_sat): 'content-type': 'srpm', } ) - assert f"Successfully uploaded file '{SRPM_TO_UPLOAD}'" in result[0]['message'] + assert f'Successfully uploaded file {SRPM_TO_UPLOAD}' in result[0]['message'] assert ( int(target_sat.cli.Repository.info({'id': repo['id']})['content-counts']['source-rpms']) == 1 @@ -2569,7 +2569,7 @@ def test_positive_upload_file_to_file_repo(self, repo_options, repo, target_sat) 'product-id': repo['product']['id'], } ) - assert f"Successfully uploaded file '{RPM_TO_UPLOAD}'" in result[0]['message'] + assert f'Successfully uploaded file {RPM_TO_UPLOAD}' in result[0]['message'] repo = target_sat.cli.Repository.info({'id': repo['id']}) assert repo['content-counts']['files'] == '1' filesearch = entities.File().search( @@ -2614,7 +2614,7 @@ def test_positive_remove_file(self, repo, target_sat): 'product-id': repo['product']['id'], } ) - assert f"Successfully uploaded file '{RPM_TO_UPLOAD}'" in result[0]['message'] + assert f'Successfully uploaded file {RPM_TO_UPLOAD}' in result[0]['message'] repo = target_sat.cli.Repository.info({'id': repo['id']}) assert int(repo['content-counts']['files']) > 0 files = target_sat.cli.File.list({'repository-id': repo['id']}) @@ -2779,7 +2779,7 @@ def test_file_repo_contains_only_newer_file(self, repo_options, repo, target_sat 'product-id': repo['product']['id'], } ) - assert f"Successfully uploaded file '{text_file_name}'" in result[0]['message'] + assert f"Successfully uploaded file {text_file_name}" in result[0]['message'] repo = target_sat.cli.Repository.info({'id': repo['id']}) # Assert there is only one file assert repo['content-counts']['files'] == '1' @@ -2797,7 +2797,7 @@ def test_file_repo_contains_only_newer_file(self, repo_options, repo, target_sat 'product-id': repo['product']['id'], } ) - assert f"Successfully uploaded file '{text_file_name}'" in result[0]['message'] + assert f"Successfully uploaded file {text_file_name}" in result[0]['message'] repo = target_sat.cli.Repository.info({'id': repo['id']}) # Assert there is still only one file assert repo['content-counts']['files'] == '1'