Repository: SynBioDex/tyto (language: python)

Issue:
Test breaks because Ontobee stopped supporting GNO
`test_get_ontologies` breaks because it looks for the GNO ontology at Ontobee and can't find it
`get_ontologies` drops one of the hosted ontologies
Due to a fence post error, the last ontology is omitted when returning a list of hosted ontologies at Ontobee


Discussion / hints:

Fix patch:
diff --git a/tyto/endpoint/endpoint.py b/tyto/endpoint/endpoint.py
index 839a6d0..ee07666 100644
--- a/tyto/endpoint/endpoint.py
+++ b/tyto/endpoint/endpoint.py
@@ -160,8 +160,10 @@ def get_ontologies(self):
         # Response is a flat list; pack into tuples of (uri, ontology name)
         ontologies = {}
         n_ontologies = int(len(response) / 2)
-        for uri, ontology_name in zip(response[:n_ontologies], response[n_ontologies+1:]):
+        for uri, ontology_name in zip(response[:n_ontologies], response[n_ontologies:]):
             ontologies[uri] = ontology_name
+            print(ontology_name, uri)
+        print(len(response[:n_ontologies]), len(response[n_ontologies+1:]))
         return ontologies
 
 


Test patch:
diff --git a/test/test_ontology.py b/test/test_ontology.py
index 45c2aea..adf5b8d 100644
--- a/test/test_ontology.py
+++ b/test/test_ontology.py
@@ -95,7 +95,7 @@ def test_nonunique_labels(self):
 
     def test_get_ontologies(self):
        self.assertEqual(tyto.Ontobee.get_ontologies()\
-                        ['http://purl.obolibrary.org/obo/gno.owl'],
+                        ['http://purl.obolibrary.org/obo/ecao.owl'],
                         'Echinoderm Anatomy and Development Ontology')
        self.assertEqual(tyto.EBIOntologyLookupService.get_ontologies()
                         ['http://purl.obolibrary.org/obo/gno.owl'],