示例#1
0
 def test_file_error(self):
     # Try downloading to a location that doesn't exist
     self.assertEqual(manager.manage_download(test_links["direct"], "doesnt/exist", "file"),
                      (test_links["direct"], False))
示例#2
0
 def test_failing_download(self):
     self.assertEqual(manager.manage_download(test_links["fail"], "path", "file"),
                      (test_links["fail"], False))
示例#3
0
 def test_tumblr_link(self, mocked):
     manager.manage_download(test_links["tumblr_link"], "path", "file")
     mocked.assert_called_once_with(test_links["tumblr_link"], "path", "file")
示例#4
0
 def test_redditbooru_gallery(self, mocked):
     manager.manage_download(test_links["redditbooru_gallery"], "path", "file")
     mocked.assert_called_once_with(test_links["redditbooru_gallery"], "path", "file")
示例#5
0
 def test_imgur_album(self, mocked):
     manager.manage_download(test_links["imgur_album"], "path", "file")
     mocked.assert_called_once_with(test_links["imgur_album"], "path", "file")
示例#6
0
 def test_direct(self, mocked):
     manager.manage_download(test_links["direct"], "path", "file")
     mocked.assert_called_once_with(test_links["direct"], "path", "file")