blob: 9a5084e83062023f0648f8ce431e54112aed5910 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import praw
import pytest
from importer.downloader import Downloader
import importer.providers as providers
from importer.providers import ProviderBase
@pytest.mark.parametrize("provider",
[
providers.IReddit,
providers.Imgur,
providers.RawImageProviderBase,
providers.RedGifs,
providers.Youtube,
providers.YoutubeDlProviderBase
])
def test_provider(provider):
for test in provider._TEST:
with provider(url=test['url']) as p:
p.download()
assert p.downloaded
assert p.paths == test['paths']
|