|
19 | 19 | from cohd.translator.ontology_kp import OntologyKP |
20 | 20 |
|
21 | 21 | # Choose which server to test |
22 | | -# cr.server = 'https://cohd.io/api' |
| 22 | +# cr.server = 'https://dev.cohd.io/api' |
23 | 23 | # 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 |
26 | 26 |
|
27 | 27 | # Specify what Biolink and TRAPI versions are expected by the server |
28 | 28 | BIOLINK_VERSION = '3.5.0' |
@@ -896,14 +896,14 @@ def test_translator_query_qnode_subclasses(): |
896 | 896 |
|
897 | 897 | # There should be more than 1 result |
898 | 898 | 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): |
900 | 900 | # There was previously an issue observed with the OntologyKP, which may degrade results here. |
901 | 901 | # Issue warning, but don't fail the test |
902 | 902 | warnings.warn('test_translator_query_qnode_subclasses: Expected more than 1 result but only found ' |
903 | 903 | f'{len(results)} results. However, OntologyKP may be having issues right now.') |
904 | 904 | return |
905 | 905 |
|
906 | | - assert len(results) > 1, _print_trapi_log(json) |
| 906 | + assert results and len(results) > 1, _print_trapi_log(json) |
907 | 907 |
|
908 | 908 | # We are expecting COHD to provide descendant results for the "subj" QNode (MONDO:0005015) |
909 | 909 | # Check that query_id is specified in the node bindings |
|
0 commit comments