Skip to content

Commit

Permalink
[6.14.z] Fix assertions in file repo tests (#15140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored May 22, 2024
1 parent c29e052 commit 28f57a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/foreman/cli/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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']})
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit 28f57a3

Please sign in to comment.