From 9ee13aea23b7f7932ab737d1cc481bbc0bedbd39 Mon Sep 17 00:00:00 2001 From: OMEGARAZER <869111+OMEGARAZER@users.noreply.github.com> Date: Sat, 26 Nov 2022 14:36:19 -0500 Subject: [PATCH] Update tests Suspended user in two tests. Updated hashes and yt-dlp version. Removed success check on known failure. --- requirements.txt | 2 +- tests/integration_tests/test_clone_integration.py | 2 -- .../fallback_downloaders/test_ytdlp_fallback.py | 6 +++--- tests/site_downloaders/test_vreddit.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 83378f0..62e6925 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 \ No newline at end of file +yt-dlp>=2022.11.11 diff --git a/tests/integration_tests/test_clone_integration.py b/tests/integration_tests/test_clone_integration.py index 288793b..8046687 100644 --- a/tests/integration_tests/test_clone_integration.py +++ b/tests/integration_tests/test_clone_integration.py @@ -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() diff --git a/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py b/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py index 92ba27d..29e72c5 100644 --- a/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py +++ b/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py @@ -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() diff --git a/tests/site_downloaders/test_vreddit.py b/tests/site_downloaders/test_vreddit.py index da05c1b..54ffcf8 100644 --- a/tests/site_downloaders/test_vreddit.py +++ b/tests/site_downloaders/test_vreddit.py @@ -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()