From 1c2ef1cfa1209688754d2f7c179919251f239d93 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Mon, 14 Jun 2021 19:01:00 +0200 Subject: [PATCH] Force PUT request headers to JSON in API test Aparentely FastAPI no longer assumes JSON by default. --- lib/galaxy_test/api/test_datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy_test/api/test_datasets.py b/lib/galaxy_test/api/test_datasets.py index 514b2981ab26..7268cab1d4fb 100644 --- a/lib/galaxy_test/api/test_datasets.py +++ b/lib/galaxy_test/api/test_datasets.py @@ -128,7 +128,7 @@ def test_tag_change(self): 'item_class': 'HistoryDatasetAssociation', 'item_tags': ['cool:tag_a', 'cool:tag_b', 'tag_c', 'name:tag_d', '#tag_e'], }) - put_response = self._put("tags", payload) + 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()