def test_get_prefix_direct(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.direct_workflow_version) prefix = loader.get_prefix() # Does not use tmpdir self.assertEqual(prefix, 'file:///direct/') self.assertFalse(mock_mkdtemp.called)
def __init__(self, workflow_version): loader = BespinWorkflowLoader(workflow_version) parser = BespinWorkflowParser(loader.load()) prefix = loader.get_prefix() builder = ToolDetailsBuilder(prefix) builder.accept(parser.loaded_workflow) self.version = parser.version self.tag = parser.tag self.contents = builder.build()
def test_get_prefix_zipped(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.zipped_workflow_version) prefix = loader.get_prefix() self.assertEqual(prefix, 'file:///tmpdir/unzipped/')