예제 #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")