def test_check_user_existence_good( test_redditor_name: str, reddit_instance: praw.Reddit, downloader_mock: MagicMock, ): downloader_mock.reddit_instance = reddit_instance RedditConnector.check_user_existence(downloader_mock, test_redditor_name)
def test_check_user_existence_banned( test_redditor_name: str, reddit_instance: praw.Reddit, downloader_mock: MagicMock, ): downloader_mock.reddit_instance = reddit_instance with pytest.raises(BulkDownloaderException, match='is banned'): RedditConnector.check_user_existence(downloader_mock, test_redditor_name)