diff --git a/lib/galaxy_test/api/test_libraries.py b/lib/galaxy_test/api/test_libraries.py index 6cbfaa21e0fe..1fb51357301b 100644 --- a/lib/galaxy_test/api/test_libraries.py +++ b/lib/galaxy_test/api/test_libraries.py @@ -313,7 +313,7 @@ def test_legacy_upload_unknown_datatype(self): "upload_option": "upload_file", "files_0|url_paste": FILE_URL, } - create_response = self._post(f"libraries/{library['id']}/contents", payload) + create_response = self._post(f"libraries/{library['id']}/contents", payload, json=True) self._assert_status_code_is(create_response, 400) assert create_response.json() == "Requested extension 'xxx' unknown, cannot upload dataset." @@ -552,7 +552,7 @@ def test_create_datasets_in_library_from_collection(self): history_id, contents=["xxx", "yyy"], direct_upload=True, wait=True ).json()["outputs"][0]["id"] payload = {"from_hdca_id": hdca_id, "create_type": "file", "folder_id": folder_id} - create_response = self._post(f"libraries/{library['id']}/contents", payload) + create_response = self._post(f"libraries/{library['id']}/contents", payload, json=True) self._assert_status_code_is(create_response, 200) @requires_new_library @@ -588,7 +588,7 @@ def _create_folder(self, library): create_type="folder", name="New Folder", ) - return self._post(f"libraries/{library['id']}/contents", data=create_data) + return self._post(f"libraries/{library['id']}/contents", data=create_data, json=True) def _create_subfolder(self, containing_folder_id): create_data = dict( diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index 82b458d0068e..1df5b0358c56 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -2740,7 +2740,7 @@ def raw_library_contents_create(self, library_id, payload, files=None): files = {} url_rel = f"libraries/{library_id}/contents" - return self.galaxy_interactor.post(url_rel, payload, files=files) + return self.galaxy_interactor.post(url_rel, payload, files=files, json=True) def show_ld_raw(self, library_id: str, library_dataset_id: str) -> Response: response = self.galaxy_interactor.get(f"libraries/{library_id}/contents/{library_dataset_id}") @@ -2759,7 +2759,7 @@ def show_ldda(self, ldda_id): def new_library_dataset_in_private_library(self, library_name="private_dataset", wait=True): library = self.new_private_library(library_name) payload, files = self.create_dataset_request(library, file_type="txt", contents="create_test") - create_response = self.galaxy_interactor.post(f"libraries/{library['id']}/contents", payload, files=files) + create_response = self.galaxy_interactor.post(f"libraries/{library['id']}/contents", payload, files=files, json=True) api_asserts.assert_status_code_is(create_response, 200) library_datasets = create_response.json() assert len(library_datasets) == 1