From 2f832247bc288f6a0c1728191ad9cf38ac5231b1 Mon Sep 17 00:00:00 2001 From: Ekaterina Sakharova Date: Mon, 29 Jan 2024 13:19:51 +0000 Subject: [PATCH] Fix some ME tests --- emgapi/metagenomics_exchange.py | 3 ++- tests/me/test_metagenomics_exchange.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emgapi/metagenomics_exchange.py b/emgapi/metagenomics_exchange.py index 74cf61c6b..56b8d7970 100644 --- a/emgapi/metagenomics_exchange.py +++ b/emgapi/metagenomics_exchange.py @@ -93,8 +93,9 @@ def check_analysis(self, source_id: str, sequence_id: str, public=None, metadata if public: params = { "status": "public" if public else "private", + "broker": self.broker } - endpoint = f"sequences/{sequence_id}" + endpoint = f"sequences/{sequence_id}/datasets" response = self.get_request(endpoint=endpoint, params=params) analysis_registry_id = None metadata_match = True diff --git a/tests/me/test_metagenomics_exchange.py b/tests/me/test_metagenomics_exchange.py index 58558df01..48f6ff640 100644 --- a/tests/me/test_metagenomics_exchange.py +++ b/tests/me/test_metagenomics_exchange.py @@ -65,7 +65,7 @@ def test_wrong_delete_request_me(self): registry_id = "MGX0000780" endpoint = f"dataset/{registry_id}" - with pytest.raises(requests.HTTPError, match="401 Client Error"): + with pytest.raises(requests.HTTPError, match="404 Client Error"): me_api.delete_request(endpoint) def test_patch_analysis_me(self):