def test__download_workflow(self, mock_urlretrieve, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.zipped_workflow_version) loader._download_workflow() self.assertEqual( mock_urlretrieve.call_args, call(self.zipped_workflow_version.url, loader.download_path))
def test__no_download_direct(self, mock_urlretriefve, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.direct_workflow_version) loader._download_workflow() self.assertFalse(mock_mkdtemp.called) self.assertFalse(mock_urlretriefve.called)