Skip to content

Commit 51df642

Browse files
committed
Merge remote-tracking branch 'origin/master' into precompute_stats
2 parents 2b8d53f + 67932a1 commit 51df642

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test_cohd_trapi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from cohd.translator.ontology_kp import OntologyKP
2020

2121
# Choose which server to test
22-
# cr.server = 'https://cohd.io/api'
22+
# cr.server = 'https://dev.cohd.io/api'
2323
# cr.server = 'https://cohd-api.ci.transltr.io/api'
24-
cr.server = 'https://cohd-api.test.transltr.io/api' # Temporarily default to Test as Translator consrotia has only deployed TRAPI 1.4 to Test
25-
# cr.server = 'https://cohd-api.transltr.io/api' # Default to ITRB-Production instance
24+
# cr.server = 'https://cohd-api.test.transltr.io/api' # Temporarily default to Test as Translator consrotia has only deployed TRAPI 1.4 to Test
25+
cr.server = 'https://cohd-api.transltr.io/api' # Default to ITRB-Production instance
2626

2727
# Specify what Biolink and TRAPI versions are expected by the server
2828
BIOLINK_VERSION = '3.5.0'
@@ -896,14 +896,14 @@ def test_translator_query_qnode_subclasses():
896896

897897
# There should be more than 1 result
898898
results = json['message']['results']
899-
if _ontology_kp_issue and len(results) < 2:
899+
if _ontology_kp_issue and (not results or len(results) < 2):
900900
# There was previously an issue observed with the OntologyKP, which may degrade results here.
901901
# Issue warning, but don't fail the test
902902
warnings.warn('test_translator_query_qnode_subclasses: Expected more than 1 result but only found '
903903
f'{len(results)} results. However, OntologyKP may be having issues right now.')
904904
return
905905

906-
assert len(results) > 1, _print_trapi_log(json)
906+
assert results and len(results) > 1, _print_trapi_log(json)
907907

908908
# We are expecting COHD to provide descendant results for the "subj" QNode (MONDO:0005015)
909909
# Check that query_id is specified in the node bindings

0 commit comments

Comments
 (0)