From ae7225307c6b86c3a54a6f20b859bb21339ed0d7 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:39:50 -0400 Subject: [PATCH] [6.15.z] change a way to upload content into satellite (#14403) --- tests/foreman/api/test_repository.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/foreman/api/test_repository.py b/tests/foreman/api/test_repository.py index 206dddb976f..728249f097c 100644 --- a/tests/foreman/api/test_repository.py +++ b/tests/foreman/api/test_repository.py @@ -2295,13 +2295,14 @@ def test_positive_upload_file_to_file_repo(self, repo, target_sat): :CaseAutomation: Automated """ - repo.upload_content(files={'content': DataFile.RPM_TO_UPLOAD.read_bytes()}) + with open(DataFile.FAKE_FILE_NEW_NAME, 'rb') as handle: + repo.upload_content(files={'content': handle}) assert repo.read().content_counts['file'] == 1 filesearch = target_sat.api.File().search( - query={"search": f"name={constants.RPM_TO_UPLOAD}"} + query={"search": f"name={constants.FAKE_FILE_NEW_NAME}"} ) - assert filesearch[0].name == constants.RPM_TO_UPLOAD + assert filesearch[0].name == constants.FAKE_FILE_NEW_NAME @pytest.mark.tier1 @pytest.mark.upgrade