Example #1
0
 def test_dont_download_if_cached(self):
     test_online_cached = DataSet(OSFS("."), "/local/path", "test_id",
                                  "http://source/to/file", "test dataset",
                                  "zip")
     test_online_cached._download = mock.Mock()
     test_online_cached.is_cached = mock.Mock(return_value=True)
     test_online_cached.download()
     test_online_cached._download.assert_not_called()
Example #2
0
 def test_zip_download(self):
     test_ds = DataSet(OSFS("."), "/local/path", "test_id",
                       "http://source/to/file", "test dataset", "zip")
     test_ds._download = mock.Mock()
     test_ds.download()
     test_ds._download.assert_called_with("/local/path.zip")