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):