tests: move outside of the package

This commit is contained in:
Ali Parlakci
2021-04-20 20:40:57 +03:00
committed by Serene
parent bd5afe5333
commit 1c4cfbb580
25 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
# coding=utf-8
import praw
import pytest
from bdfr.resource import Resource
from bdfr.site_downloaders.vreddit import VReddit
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.parametrize(('test_submission_id'), (
('lu8l8g'),
))
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].content is not None