1
0
Fork 0
mirror of synced 2024-06-02 02:14:37 +12:00

test_vreddit: remove flaky test (#272)

This commit is contained in:
Ali Parlakçı 2021-04-17 14:07:20 +03:00 committed by Ali Parlakci
parent 8eb374eec6
commit 5e81160e5f

View file

@ -10,14 +10,14 @@ from bdfr.site_downloaders.vreddit import VReddit
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.parametrize(('test_submission_id', 'expected_hash'), (
('lu8l8g', 'c5f8c0ba2ff6e37a14e267a787696cc6'),
@pytest.mark.parametrize(('test_submission_id'), (
('lu8l8g'),
))
def test_find_resources(test_submission_id: str, expected_hash: str, reddit_instance: praw.Reddit):
def test_find_resources(test_submission_id: str, reddit_instance: praw.Reddit):
test_submission = reddit_instance.submission(id=test_submission_id)
downloader = VReddit(test_submission)
resources = downloader.find_resources()
assert len(resources) == 1
assert isinstance(resources[0], Resource)
resources[0].download(120)
assert resources[0].hash.hexdigest() == expected_hash
assert resources[0].content is not None