Update tests
Suspended user in two tests. Updated hashes and yt-dlp version. Removed success check on known failure.
This commit is contained in:
parent
87104e7e6a
commit
9ee13aea23
|
@ -6,4 +6,4 @@ ffmpeg-python>=0.2.0
|
|||
praw>=7.2.0
|
||||
pyyaml>=5.4.1
|
||||
requests>=2.25.1
|
||||
yt-dlp>=2022.9.1
|
||||
yt-dlp>=2022.11.11
|
||||
|
|
|
@ -36,8 +36,6 @@ def create_basic_args_for_cloner_runner(test_args: list[str], tmp_path: Path):
|
|||
['-s', 'TrollXChromosomes/', '-L', 1],
|
||||
['-l', 'eiajjw'],
|
||||
['-l', 'xl0lhi'],
|
||||
['-l', 'ijy4ch'], # user deleted post
|
||||
['-l', 'kw4wjm'], # post from banned subreddit
|
||||
))
|
||||
def test_cli_scrape_general(test_args: list[str], tmp_path: Path):
|
||||
runner = CliRunner()
|
||||
|
|
|
@ -15,7 +15,7 @@ from bdfr.site_downloaders.fallback_downloaders.ytdlp_fallback import YtdlpFallb
|
|||
('https://www.youtube.com/watch?v=P19nvJOmqCc', True),
|
||||
('https://www.example.com/test', False),
|
||||
('https://milesmatrix.bandcamp.com/album/la-boum/', False),
|
||||
('https://v.redd.it/54i8fvzev3u81', True),
|
||||
('https://v.redd.it/dlr54z8p182a1', True),
|
||||
))
|
||||
def test_can_handle_link(test_url: str, expected: bool):
|
||||
result = YtdlpFallback.can_handle_link(test_url)
|
||||
|
@ -36,8 +36,8 @@ def test_info_extraction_bad(test_url: str):
|
|||
@pytest.mark.parametrize(('test_url', 'expected_hash'), (
|
||||
('https://streamable.com/dt46y', 'b7e465adaade5f2b6d8c2b4b7d0a2878'),
|
||||
('https://streamable.com/t8sem', '49b2d1220c485455548f1edbc05d4ecf'),
|
||||
('https://www.reddit.com/r/specializedtools/comments/n2nw5m/bamboo_splitter/', '03087ce64f88f438bad6849858c9b7f0'),
|
||||
('https://v.redd.it/9z1dnk3xr5k61', '9ce39c8e46b6534a0b3f164a792d51c8'),
|
||||
('https://www.reddit.com/r/specializedtools/comments/n2nw5m/bamboo_splitter/', '6c6ff46e04b4e33a755ae2a9b5a45ac5'),
|
||||
('https://v.redd.it/9z1dnk3xr5k61', '226cee353421c7aefb05c92424cc8cdd'),
|
||||
))
|
||||
def test_find_resources(test_url: str, expected_hash: str):
|
||||
test_submission = MagicMock()
|
||||
|
|
|
@ -13,7 +13,7 @@ from bdfr.site_downloaders.vreddit import VReddit
|
|||
@pytest.mark.online
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.parametrize(('test_url', 'expected_hash'), (
|
||||
('https://www.reddit.com/user/Xomb_Forever/comments/u5p2kj/hold_up/', '379ef5cd87203544d51caee31e72d210'),
|
||||
('https://reddit.com/r/Unexpected/comments/z4xsuj/omg_thats_so_cute/', '1ffab5e5c0cc96db18108e4f37e8ca7f'),
|
||||
))
|
||||
def test_find_resources_good(test_url: str, expected_hash: str):
|
||||
test_submission = MagicMock()
|
||||
|
|
Loading…
Reference in a new issue