test_vreddit: remove flaky test (#272)
This commit is contained in:
committed by
Ali Parlakci
parent
8eb374eec6
commit
5e81160e5f
@@ -10,14 +10,14 @@ from bdfr.site_downloaders.vreddit import VReddit
|
|||||||
|
|
||||||
@pytest.mark.online
|
@pytest.mark.online
|
||||||
@pytest.mark.reddit
|
@pytest.mark.reddit
|
||||||
@pytest.mark.parametrize(('test_submission_id', 'expected_hash'), (
|
@pytest.mark.parametrize(('test_submission_id'), (
|
||||||
('lu8l8g', 'c5f8c0ba2ff6e37a14e267a787696cc6'),
|
('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)
|
test_submission = reddit_instance.submission(id=test_submission_id)
|
||||||
downloader = VReddit(test_submission)
|
downloader = VReddit(test_submission)
|
||||||
resources = downloader.find_resources()
|
resources = downloader.find_resources()
|
||||||
assert len(resources) == 1
|
assert len(resources) == 1
|
||||||
assert isinstance(resources[0], Resource)
|
assert isinstance(resources[0], Resource)
|
||||||
resources[0].download(120)
|
resources[0].download(120)
|
||||||
assert resources[0].hash.hexdigest() == expected_hash
|
assert resources[0].content is not None
|
||||||
|
|||||||
Reference in New Issue
Block a user