Add option to search for files pre-emptively

This commit is contained in:
Serene-Arc
2021-03-12 13:24:25 +10:00
committed by Ali Parlakci
parent 285d422c0e
commit ae0269e13b
3 changed files with 52 additions and 32 deletions

View File

@@ -388,8 +388,7 @@ def test_sanitise_subreddit_name(test_name: str, expected: str):
assert result == expected
def test_search_existing_files(downloader_mock: MagicMock):
downloader_mock.download_directory = Path('.').resolve().expanduser()
results = RedditDownloader.scan_existing_files(downloader_mock)
def test_search_existing_files():
results = RedditDownloader.scan_existing_files(Path('.'))
assert all([isinstance(result, str) for result in results])
assert len(results) >= 40