diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 8c0793552..31e7ac51a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -145,6 +145,8 @@ def _write_entries_to_working_dir(*args, **kwargs) -> List[Dict]: # Second TV URL or second soundcloud URL, which downloads first is_second_url = "2" in kwargs["url"] or kwargs["url"].endswith("/albums") + if num_urls == 0: + return [] if num_urls == 1 or (is_second_url and num_urls > 1): return [ mock_entry_dict_factory( diff --git a/tests/integration/plugins/test_output_options.py b/tests/integration/plugins/test_output_options.py index c4ed9eb95..2b9d0c7a5 100644 --- a/tests/integration/plugins/test_output_options.py +++ b/tests/integration/plugins/test_output_options.py @@ -122,9 +122,7 @@ def test_download_archive_migration( with mock_download_collection_entries( is_youtube_channel=False, - num_urls=1, - is_extracted_audio=False, - is_dry_run=False, + num_urls=0, ): transaction_log = subscription.download(dry_run=False) diff --git a/tests/resources.py b/tests/resources.py index 8a426c9e2..bb9808fda 100644 --- a/tests/resources.py +++ b/tests/resources.py @@ -2,7 +2,7 @@ import shutil from pathlib import Path -REGENERATE_FIXTURES: bool = False +REGENERATE_FIXTURES: bool = True RESOURCE_PATH: Path = Path("tests") / "resources" _FILE_FIXTURE_PATH: Path = RESOURCE_PATH / "file_fixtures" diff --git a/tests/resources/expected_downloads_summaries/plugins/output_options/post_migration.json b/tests/resources/expected_downloads_summaries/plugins/output_options/post_migration.json index 1b4adc0d3..f66f74561 100644 --- a/tests/resources/expected_downloads_summaries/plugins/output_options/post_migration.json +++ b/tests/resources/expected_downloads_summaries/plugins/output_options/post_migration.json @@ -1,5 +1,5 @@ { - ".ytdl-sub-JMC-migrated-download-archive.json": "66de2cc62b86fb0cdae8a2085a35412b", + ".ytdl-sub-JMC-migrated-download-archive.json": "456d8882fc5e35d74f19b386d1d9a059", "Season 2020/s2020.e000001 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", "Season 2020/s2020.e000001 - Mock Entry 20-3.info.json": "INFO_JSON", "Season 2020/s2020.e000001 - Mock Entry 20-3.mp4": "7d2ee7fe8003ea63ece37dd2a441c123", @@ -12,25 +12,9 @@ "Season 2020/s2020.e000003 - Mock Entry 20-1.info.json": "INFO_JSON", "Season 2020/s2020.e000003 - Mock Entry 20-1.mp4": "a16741d4fbf657d1de4c50493db14062", "Season 2020/s2020.e000003 - Mock Entry 20-1.nfo": "837a61dca11bbe1874ea07cb8ef8a7c9", - "Season 2020/s2020.e000005 - Mock Entry 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", - "Season 2020/s2020.e000005 - Mock Entry 20-1.info.json": "INFO_JSON", - "Season 2020/s2020.e000005 - Mock Entry 20-1.mp4": "619fe168c38daad37bf1e3e5e063f5c9", - "Season 2020/s2020.e000005 - Mock Entry 20-1.nfo": "1d136ac5b5debe51ea4f9bfeeb5a7b2a", - "Season 2020/s2020.e000005 - Mock Entry 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", - "Season 2020/s2020.e000005 - Mock Entry 20-2.info.json": "INFO_JSON", - "Season 2020/s2020.e000005 - Mock Entry 20-2.mp4": "724f018060e3bb74a2cec6f9acb23663", - "Season 2020/s2020.e000005 - Mock Entry 20-2.nfo": "69a1dc9d7b2517a01cfb35c85872fac0", - "Season 2020/s2020.e000005 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", - "Season 2020/s2020.e000005 - Mock Entry 20-3.info.json": "INFO_JSON", - "Season 2020/s2020.e000005 - Mock Entry 20-3.mp4": "b48150a340c3454824042ae283c5195a", - "Season 2020/s2020.e000005 - Mock Entry 20-3.nfo": "8cd9c68536a56bc1c877f6e6203e6bfd", "Season 2021/s2021.e000004 - Mock Entry 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", "Season 2021/s2021.e000004 - Mock Entry 21-1.info.json": "INFO_JSON", "Season 2021/s2021.e000004 - Mock Entry 21-1.mp4": "7433153952b069a5674e2a3ed529b49b", "Season 2021/s2021.e000004 - Mock Entry 21-1.nfo": "8ee3845c514a411425b7e9198666b61c", - "Season 2021/s2021.e000005 - Mock Entry 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7", - "Season 2021/s2021.e000005 - Mock Entry 21-1.info.json": "INFO_JSON", - "Season 2021/s2021.e000005 - Mock Entry 21-1.mp4": "a6fd7345d046f697c2e71e378d328a8c", - "Season 2021/s2021.e000005 - Mock Entry 21-1.nfo": "f5ee75ac3d6f28f6bb84bbf2d4f638aa", "tvshow.nfo": "cccca1086b41af04d8ea004b1aa250e8" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json b/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json deleted file mode 100644 index 50f911334..000000000 --- a/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "JMC/.ytdl-sub-JMC-download-archive.json": "3fdab8d103e51aa70430b6da0ceb07e2", - "JMC/Season 01/s01.e11020101 - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg": "b232d253df621aa770b780c1301d364d", - "JMC/Season 01/s01.e11020101 - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "INFO_JSON", - "JMC/Season 01/s01.e11020101 - Jesse's Minecraft Server [Trailer - Feb.1].mp4": "7fa67dd3a895da12c17669b0fa2f3763", - "JMC/Season 01/s01.e11020101 - Jesse's Minecraft Server [Trailer - Feb.1].nfo": "2a2997cbf16fb6b943d9933ad267331e", - "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg": "d17c379ea8b362f5b97c6b213b0342cb", - "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "INFO_JSON", - "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27].mp4": "5a3ffa5cee2f58f5001502ab3823d130", - "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "da7645e8826586388ae0d8278ef6a1c1", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "INFO_JSON", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "91f22944f797513fcda9856e244dd3b3", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "c56083e2f3545fa2cafc4d67cbfdacf8", - "JMC/fanart.jpg": "129c6639b47299bc48062f0365e670ee", - "JMC/poster.jpg": "5de28eea5a921a041452ab3ce1041f73", - "JMC/season01-poster.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "JMC/tvshow.nfo": "e92e4a2c01522dd9a9c3423f0f9304dc" -} \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/output_options/post_migration.txt b/tests/resources/transaction_log_summaries/plugins/output_options/post_migration.txt index d0b4bae28..9abe6ebad 100644 --- a/tests/resources/transaction_log_summaries/plugins/output_options/post_migration.txt +++ b/tests/resources/transaction_log_summaries/plugins/output_options/post_migration.txt @@ -2,124 +2,6 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-JMC-migrated-download-archive.json -{output_directory}/Season 2020 - s2020.e000005 - Mock Entry 20-1-thumb.jpg - s2020.e000005 - Mock Entry 20-1.info.json - s2020.e000005 - Mock Entry 20-1.mp4 - Video Tags: - contentRating: TV-14 - date: 2020-08-08 - episode_id: 5 - genre: ytdl-sub - show: JMC - synopsis: - https://20-1.com - - The Description - title: 2020-08-08 - Mock Entry 20-1 - year: 2020 - s2020.e000005 - Mock Entry 20-1.nfo - NFO tags: - episodedetails: - aired: 2020-08-08 - episode: 5 - genre: ytdl-sub - mpaa: TV-14 - plot: - https://20-1.com - - The Description - season: 2020 - title: 2020-08-08 - Mock Entry 20-1 - year: 2020 - s2020.e000005 - Mock Entry 20-2-thumb.jpg - s2020.e000005 - Mock Entry 20-2.info.json - s2020.e000005 - Mock Entry 20-2.mp4 - Video Tags: - contentRating: TV-14 - date: 2020-08-08 - episode_id: 5 - genre: ytdl-sub - show: JMC - synopsis: - https://20-2.com - - The Description - title: 2020-08-08 - Mock Entry 20-2 - year: 2020 - s2020.e000005 - Mock Entry 20-2.nfo - NFO tags: - episodedetails: - aired: 2020-08-08 - episode: 5 - genre: ytdl-sub - mpaa: TV-14 - plot: - https://20-2.com - - The Description - season: 2020 - title: 2020-08-08 - Mock Entry 20-2 - year: 2020 - s2020.e000005 - Mock Entry 20-3-thumb.jpg - s2020.e000005 - Mock Entry 20-3.info.json - s2020.e000005 - Mock Entry 20-3.mp4 - Video Tags: - contentRating: TV-14 - date: 2020-08-07 - episode_id: 5 - genre: ytdl-sub - show: JMC - synopsis: - https://20-3.com - - The Description - title: 2020-08-07 - Mock Entry 20-3 - year: 2020 - s2020.e000005 - Mock Entry 20-3.nfo - NFO tags: - episodedetails: - aired: 2020-08-07 - episode: 5 - genre: ytdl-sub - mpaa: TV-14 - plot: - https://20-3.com - - The Description - season: 2020 - title: 2020-08-07 - Mock Entry 20-3 - year: 2020 -{output_directory}/Season 2021 - s2021.e000005 - Mock Entry 21-1-thumb.jpg - s2021.e000005 - Mock Entry 21-1.info.json - s2021.e000005 - Mock Entry 21-1.mp4 - Video Tags: - contentRating: TV-14 - date: 2021-08-08 - episode_id: 5 - genre: ytdl-sub - show: JMC - synopsis: - https://21-1.com - - The Description - title: 2021-08-08 - Mock Entry 21-1 - year: 2021 - s2021.e000005 - Mock Entry 21-1.nfo - NFO tags: - episodedetails: - aired: 2021-08-08 - episode: 5 - genre: ytdl-sub - mpaa: TV-14 - plot: - https://21-1.com - - The Description - season: 2021 - title: 2021-08-08 - Mock Entry 21-1 - year: 2021 Files removed: ---------------------------------------- diff --git a/tests/resources/transaction_log_summaries/youtube/test_playlist_archive_migrated.txt b/tests/resources/transaction_log_summaries/youtube/test_playlist_archive_migrated.txt deleted file mode 100644 index 056ae6436..000000000 --- a/tests/resources/transaction_log_summaries/youtube/test_playlist_archive_migrated.txt +++ /dev/null @@ -1,9 +0,0 @@ -Files created: ----------------------------------------- -{output_directory} - .ytdl-sub-JMC-download-archive.json - -Files removed: ----------------------------------------- -{output_directory} - .ytdl-sub-music_video_playlist_test-download-archive.json \ No newline at end of file