From afe7176ece52f6535443475e138f615817745d9d Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Tue, 15 Jun 2021 11:10:15 +0200 Subject: [PATCH] Add TODOs to set JSON content-type in the interactor --- lib/galaxy_test/api/test_datasets.py | 3 +++ test/integration/test_tool_data_delete.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/galaxy_test/api/test_datasets.py b/lib/galaxy_test/api/test_datasets.py index 7268cab1d4fb..a69bfbfa457a 100644 --- a/lib/galaxy_test/api/test_datasets.py +++ b/lib/galaxy_test/api/test_datasets.py @@ -128,7 +128,10 @@ def test_tag_change(self): 'item_class': 'HistoryDatasetAssociation', 'item_tags': ['cool:tag_a', 'cool:tag_b', 'tag_c', 'name:tag_d', '#tag_e'], }) + + # TODO remove the headers here and add json parameter to _put method put_response = self._put("tags", data=payload, headers={'Content-Type': 'application/json'}) + self._assert_status_code_is_ok(put_response) updated_hda = self._get( f"histories/{self.history_id}/contents/{hda_id}").json() diff --git a/test/integration/test_tool_data_delete.py b/test/integration/test_tool_data_delete.py index e861b337617f..ee0bb16a35b0 100644 --- a/test/integration/test_tool_data_delete.py +++ b/test/integration/test_tool_data_delete.py @@ -61,7 +61,10 @@ def test_admin_delete_data_table_entry(self): self.assertEquals(len(updated_fields), original_count + 1) new_field = updated_fields[-1] url = self._api_url(f"tool_data/testbeta?key={self.galaxy_interactor.api_key}") + + # TODO remove the headers here, use the interactor _delete method and add json parameter to it delete_response = delete(url, data=json.dumps({"values": "\t".join(new_field)}), headers={'Content-Type': 'application/json'}) + delete_response.raise_for_status() time.sleep(2) show_response = self._get("tool_data/testbeta")