Allow subreddits and multireddits to fail individually

This commit is contained in:
Serene-Arc
2021-03-11 17:18:21 +10:00
committed by Ali Parlakci
parent fc6e5872b2
commit 2b9dc1b96c
2 changed files with 33 additions and 41 deletions

View File

@@ -217,24 +217,6 @@ def test_get_multireddits_public(
assert_all_results_are_submissions((limit * len(test_multireddits)) if limit else None, results)
@pytest.mark.online
@pytest.mark.reddit
def test_get_multireddits_no_user(downloader_mock: MagicMock, reddit_instance: praw.Reddit):
downloader_mock.args.multireddit = ['test']
with pytest.raises(BulkDownloaderException):
RedditDownloader._get_multireddits(downloader_mock)
@pytest.mark.online
@pytest.mark.reddit
def test_get_multireddits_not_authenticated(downloader_mock: MagicMock, reddit_instance: praw.Reddit):
downloader_mock.args.multireddit = ['test']
downloader_mock.authenticated = False
downloader_mock.reddit_instance = reddit_instance
with pytest.raises(RedditAuthenticationError):
RedditDownloader._get_multireddits(downloader_mock)
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.parametrize(('test_user', 'limit'), (