Skip to content

Commit

Permalink
fix mychem curie tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanWelzel committed Aug 13, 2024
1 parent 53f5b29 commit 6fbf1f5
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@

from biothings.tests.web import BiothingsDataTest


logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


class TestMyChemCurieIdParsing(BiothingsDataTest):
host = "mygene.info"
host = "mychem.info"
prefix = "v1"

@pytest.mark.xfail(
reason="CURIE ID SUPPORT NOT CURRENTLY ENABLED ON MYCHEM.INFO HOST",
run=True,
strict=True,
)
def test_001_curie_id_annotation_endpoint_GET(self):
"""
Tests the annotation endpoint support for the biolink CURIE ID.
Expand Down Expand Up @@ -76,7 +70,8 @@ def test_001_curie_id_annotation_endpoint_GET(self):
for query_collection in curie_id_testing_collection:
query_result_storage = []
for similar_query in query_collection:
query_result = self.request(f"{endpoint}/{similar_query}", expect=200)
query_result = self.request(
f"{endpoint}/{similar_query}", expect=200)
query_result = self.request(f"{endpoint}/{similar_query}")
assert isinstance(query_result, requests.models.Response)
assert query_result.url == self.get_url(
Expand All @@ -96,11 +91,6 @@ def test_001_curie_id_annotation_endpoint_GET(self):
aggregation_query_groups.append(all(results_aggregation))
assert all(aggregation_query_groups)

@pytest.mark.xfail(
reason="CURIE ID SUPPORT NOT CURRENTLY ENABLED ON MYCHEM.INFO HOST",
run=True,
strict=True,
)
def test_002_curie_id_annotation_endpoint_POST(self):
"""
Tests the annotations endpoint support for the biolink CURIE ID.
Expand Down Expand Up @@ -160,7 +150,8 @@ def test_002_curie_id_annotation_endpoint_POST(self):
results_aggregation = []
endpoint = "chem"
for query_collection in curie_id_testing_collection:
base_result = self.request(f"{endpoint}/{query_collection[0]}", expect=200)
base_result = self.request(
f"{endpoint}/{query_collection[0]}", expect=200)

delimiter = ","
data_mapping = {
Expand Down

0 comments on commit 6fbf1f5

Please sign in to comment.