def testExternalURL(self): pa = PhylesystemAPI(self.domains, get_from='api') u = pa.get_external_url('pg_10') re = requests.get(u).json() sid = find_val_literal_meta_first(re['nexml'], 'ot:studyId', detect_nexson_version(re)) self.assertTrue(sid in ['10', 'pg_10'])
def testExternalURL(self): # N.B. that the URL for this API call is an odd one, e.g. # http://devapi.opentreeoflife.org/phylesystem/external_url/pg_10 pa = PhylesystemAPI(self.domains, get_from='api') u = pa.get_external_url('pg_10') re = requests.get(u).json() sid = find_val_literal_meta_first(re['nexml'], 'ot:studyId', detect_nexson_version(re)) self.assertTrue(sid in ['10', 'pg_10'])
def testExternalURL(self): # N.B. that the URL for this API call is an odd one, e.g. # http://devapi.opentreeoflife.org/phylesystem/external_url/pg_10 pa = PhylesystemAPI(self.domains, get_from='api') u = pa.get_external_url('pg_10') re = requests.get(u).json() sid = find_val_literal_meta_first(re['nexml'], 'ot:studyId', detect_nexson_version(re)) self.assertTrue(sid in ['10', 'pg_10'])
def testExternalURL(self): pa = PhylesystemAPI(self.domains, get_from='api') u = pa.get_external_url('pg_10') re = requests.get(u).json() sid = find_val_literal_meta_first(re['nexml'], 'ot:studyId', detect_nexson_version(re)) self.assertTrue(sid in ['10', 'pg_10'])