File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import unittest
2+ from opentree import OT , util
3+
4+ class TestUtil (unittest .TestCase ):
5+ def test_taxon_flag (self ):
6+ corr_url = 'https://github.com/OpenTreeOfLife/reference-taxonomy/wiki/Taxon-flags#flags-leading-to-taxa-being-unavailable-for-tnrs'
7+ assert util .get_suppressed_taxon_flag_expl_url () == corr_url , util .get_suppressed_taxon_flag_expl_url ()
8+
9+
10+ assert util .ott_str_as_int ('23' ) == 23
11+
12+ corr_ott_link = 'https://tree.opentreeoflife.org/taxonomy/browse?id=123'
13+ assert util ._create_link_from_node_info_conf_key_value_pair ('ott' , 123 ) == corr_ott_link
14+
15+ corr_study_link = 'https://tree.opentreeoflife.org/curator/study/view/ot_1979?tab=trees&tree=tree1&node=node5'
16+ assert util ._create_link_from_node_info_conf_key_value_pair ('ot_1979@tree1' , 'node5' ) == corr_study_link
17+
18+ blob = OT .synth_node_info (node_id = 'mrcaott354607ott374748' ).response_dict
19+ util .write_node_info_links_to_input_trees (blob )
20+
21+
22+ blob = OT .synth_node_info (node_id = 'mrcaott177ott29310' ).response_dict
23+ util .write_node_info_links_to_input_trees (blob )
24+
25+ if __name__ == '__main__' :
26+ unittest .main ()
You can’t perform that action at this time.
0 commit comments