def test_add_tool(self): with TemporaryDirectory(prefix='test_add_tool_') as tmp_dir: tool_name = 'test_1' tool_version = 'fake.1' add_content_main([ '-p', tmp_dir, 'tool', tool_name, tool_version, "--has_primary" ]) return
def test_add_tool_with_subtools(self): with TemporaryDirectory(prefix='test_add_w_subtools_') as tmp_dir: tool_name = 'test_2' tool_version = 'fake.2' subtools = ['subtool1', 'subtool2', 'subtool3'] add_content_main(['-p', tmp_dir, 'tool', tool_name, tool_version] + subtools) return
def test_add_tool_with_biotools_id(self): with TemporaryDirectory(prefix='with_biotools_') as tmp_dir: tool_name = 'test_biotools' tool_version = 'fake.3' biotools_id = 'malvirus' subtools = ['subtool1', 'subtool2', 'subtool3'] options = ['--biotoolsID', biotools_id] add_content_main(['-p', tmp_dir, 'tool', tool_name, tool_version] + subtools + options) return
def test_add_script(self): with TemporaryDirectory() as tmp_dir: group_name = 'test_group2' project_name = 'fake_project_2' script_name = 'new_script_2' script_version = '2.nope' add_content_main([ '-p', tmp_dir, 'script', group_name, project_name, script_version, script_name ]) return
def test_add_common_script(self): with TemporaryDirectory() as tmp_dir: group_name = 'test_group1' project_name = 'fake_project_1' script_version = '1.nope' file_name = "some_filename" add_content_main([ '-p', tmp_dir, 'common_script', group_name, project_name, script_version, file_name ]) return
def test_add_subtool(self): with TemporaryDirectory(prefix='add_subtool_') as tmp_dir: tool_name = 'test_4' tool_version = 'fake.4' subtool_name = 'new_subtool' add_content_main(['-p', tmp_dir, 'tool', tool_name, tool_version]) add_content_main([ '-p', tmp_dir, 'subtool', tool_name, tool_version, subtool_name, '-u' ]) return