Example #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))
Example #2
0
 def test_failing_download(self):
     self.assertEqual(manager.manage_download(test_links["fail"], "path", "file"),
                      (test_links["fail"], False))
Example #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")
Example #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")
Example #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")
Example #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")