added basic unit tests

This commit is contained in:
Tristan Lee
2022-03-04 12:36:09 -06:00
parent c21e43ddfa
commit cd5f68e9e5
15 changed files with 457 additions and 89 deletions

View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import BitchuteScraper
def test_scrape_bitchute_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['bitchute'])]
controller.register_scraper(BitchuteScraper())
controller.scrape_channels(channels)

8
tests/scraper/gab.py Normal file
View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import GabScraper
def test_scrape_gab_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['gab'])]
controller.register_scraper(GabScraper())
controller.scrape_channels(channels)

8
tests/scraper/gettr.py Normal file
View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import GettrScraper
def test_scrape_gettr_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['gettr'])]
controller.register_scraper(GettrScraper())
controller.scrape_channels(channels)

8
tests/scraper/odysee.py Normal file
View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import OdyseeScraper
def test_scrape_odysee_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['odysee'])]
controller.register_scraper(OdyseeScraper())
controller.scrape_channels(channels)

8
tests/scraper/rumble.py Normal file
View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import RumbleScraper
def test_scrape_rumble_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['rumble'])]
controller.register_scraper(RumbleScraper())
controller.scrape_channels(channels)

View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import TelegramSnscrapeScraper
def test_scrape_telegram_snscrape_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['telegram_snscrape'])]
controller.register_scraper(TelegramSnscrapeScraper())
controller.scrape_channels(channels)

8
tests/scraper/twitter.py Normal file
View File

@@ -0,0 +1,8 @@
from cisticola.base import Channel
from cisticola.scraper import TwitterScraper
def test_scrape_twitter_channel(controller, channel_kwargs):
channels = [Channel(**channel_kwargs['twitter'])]
controller.register_scraper(TwitterScraper())
controller.scrape_channels(channels)