kopia lustrzana https://github.com/bellingcat/auto-archiver
separate reddit tests
rodzic
1039e9631f
commit
69ddb72146
|
@ -84,13 +84,6 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
||||||
5,
|
5,
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
(
|
|
||||||
"https://www.reddit.com/r/BeAmazed/comments/1l6b1n4/duy_tran_is_the_owner_and_prime_wood_work_artist/",
|
|
||||||
"Duy tran is the owner and prime wood work artist",
|
|
||||||
" Created Jan 26, 2015",
|
|
||||||
4,
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_download_pages_with_media(self, setup_module, make_item, url, in_title, in_text, image_count, video_count):
|
def test_download_pages_with_media(self, setup_module, make_item, url, in_title, in_text, image_count, video_count):
|
||||||
|
@ -133,6 +126,28 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
||||||
f"Expected media with id '{expected_id}' not found"
|
f"Expected media with id '{expected_id}' not found"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
not os.environ.get("REDDIT_TEST_USERNAME") or not os.environ.get("REDDIT_TEST_PASSWORD"),
|
||||||
|
reason="No Reddit test credentials provided",
|
||||||
|
)
|
||||||
|
@pytest.mark.download
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"url,in_title,in_text,image_count,video_count",
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"https://www.reddit.com/r/BeAmazed/comments/1l6b1n4/duy_tran_is_the_owner_and_prime_wood_work_artist/",
|
||||||
|
"Duy tran is the owner and prime wood work artist",
|
||||||
|
" Created Jan 26, 2015",
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_reddit_download_with_login(
|
||||||
|
self, setup_module, make_item, url, in_title, in_text, image_count, video_count
|
||||||
|
):
|
||||||
|
self.test_download_pages_with_media(setup_module, make_item, url, in_title, in_text, image_count, video_count)
|
||||||
|
|
||||||
@pytest.mark.download
|
@pytest.mark.download
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"url,in_html",
|
"url,in_html",
|
||||||
|
|
Ładowanie…
Reference in New Issue