Skip to content

Commit 0534dd0

Browse files
committed
inlcude conflict
1 parent 2f28517 commit 0534dd0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

opentree/test/test_util.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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()

0 commit comments

Comments
 (0)