Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assertions in file repo tests #15138

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']['srpms']) == 1
)
Expand Down Expand Up @@ -2566,7 +2566,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 @@ -2611,7 +2611,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 @@ -2776,7 +2776,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 @@ -2794,7 +2794,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
Loading