Пример #1
0
 def test__handle_download_zipped(self, mock_zipfile, mock_mkdtemp):
     self.setup_mkdtemp(mock_mkdtemp)
     loader = BespinWorkflowLoader(self.zipped_workflow_version)
     loader._handle_download()
     self.assertTrue(mock_zipfile.called)
     self.assertEqual(
         mock_zipfile.return_value.__enter__.return_value.extractall.
         call_args, call(loader.download_dir))
Пример #2
0
 def test__handle_download_packed(self, mock_zipfile, mock_mkdtemp):
     self.setup_mkdtemp(mock_mkdtemp)
     loader = BespinWorkflowLoader(self.packed_workflow_version)
     loader._handle_download()
     self.assertFalse(mock_zipfile.called)