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))
def test_failing_download(self): self.assertEqual(manager.manage_download(test_links["fail"], "path", "file"), (test_links["fail"], False))
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")
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")
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")
def test_direct(self, mocked): manager.manage_download(test_links["direct"], "path", "file") mocked.assert_called_once_with(test_links["direct"], "path", "file")