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']