diff --git a/tests/e2e/expected_transaction_log.py b/tests/e2e/expected_transaction_log.py index 2c386401..12d23187 100644 --- a/tests/e2e/expected_transaction_log.py +++ b/tests/e2e/expected_transaction_log.py @@ -10,7 +10,7 @@ def assert_transaction_log_matches( output_directory: str, transaction_log: FileHandlerTransactionLog, transaction_log_summary_file_name: str, - regenerate_transaction_log: bool = True, + regenerate_transaction_log: bool = False, ): """ Parameters @@ -23,7 +23,7 @@ def assert_transaction_log_matches( Name if the transaction log summary to compare. Lives in tests/e2e/resources/transaction_log_summaries regenerate_transaction_log - USE WITH CAUTION + USE WITH CAUTION - MANUALLY INSPECT CHANGED FILES TO ENSURE THEY LOOK GOOD! Updates the file with the input transaction log. Should only be used to update tests after an expected change is made. """ @@ -33,7 +33,9 @@ def assert_transaction_log_matches( # Write the expected summary file if regenerate is True if regenerate_transaction_log: with open(transaction_log_path, "w", encoding="utf-8") as summary_file: - summary_file.write(summary) + summary_file.write( + transaction_log.to_output_message(output_directory="{output_directory}") + ) # Read the expected summary file with open(transaction_log_path, "r", encoding="utf-8") as summary_file: diff --git a/tests/e2e/resources/transaction_log_summaries/soundcloud/test_soundcloud_discography.txt b/tests/e2e/resources/transaction_log_summaries/soundcloud/test_soundcloud_discography.txt index ef7814e2..27e66c04 100644 --- a/tests/e2e/resources/transaction_log_summaries/soundcloud/test_soundcloud_discography.txt +++ b/tests/e2e/resources/transaction_log_summaries/soundcloud/test_soundcloud_discography.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmpw98_9etl' +Files created in '{output_directory}' ---------------------------------------- .ytdl-sub-jb-download-archive.json j_b/[2021] Baby Santana's Dorian Groove/01 - Baby Santana's Dorian Groove.mp3 diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_full.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_full.txt index e3586c11..303e8874 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_full.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_full.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmps8izxi_f' +Files created in '{output_directory}' ---------------------------------------- .ytdl-sub-pz-download-archive.json Season 2010/s2010.e0813 - Oblivion Mod 'Falcor' p.1-thumb.jpg diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_no_additional_downloads.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_no_additional_downloads.txt index 6c30430d..7275663d 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_no_additional_downloads.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_no_additional_downloads.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmptwnuinwm' +Files created in '{output_directory}' ---------------------------------------- .ytdl-sub-pz-download-archive.json fanart.jpg diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_recent.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_recent.txt index bcc54f2b..f8a4f79c 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_recent.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_channel_recent.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmprvao2i5r' +Files created in '{output_directory}' ---------------------------------------- .ytdl-sub-pz-download-archive.json Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer-thumb.jpg diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_merge_playlist.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_merge_playlist.txt index bc3970f3..39df4aac 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_merge_playlist.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_merge_playlist.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmpjr9rb2hf' +Files created in '{output_directory}' ---------------------------------------- JMC - Jesse's Minecraft Server-thumb.jpg JMC - Jesse's Minecraft Server.mkv diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_playlist.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_playlist.txt index e1ebd3b6..3d31bea7 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_playlist.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_playlist.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmpty4f_r8j' +Files created in '{output_directory}' ---------------------------------------- .ytdl-sub-jmc-download-archive.json JMC - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_split_video.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_split_video.txt index a3e6e10b..28ea9910 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_split_video.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_split_video.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmpjhb4fhk6' +Files created in '{output_directory}' ---------------------------------------- Project Zombie - 1-6.Intro.mp4 0:00 - 0:10 diff --git a/tests/e2e/resources/transaction_log_summaries/youtube/test_video.txt b/tests/e2e/resources/transaction_log_summaries/youtube/test_video.txt index f761764e..0db01fd8 100644 --- a/tests/e2e/resources/transaction_log_summaries/youtube/test_video.txt +++ b/tests/e2e/resources/transaction_log_summaries/youtube/test_video.txt @@ -1,4 +1,4 @@ -Files created in '/tmp/tmptz1msudg' +Files created in '{output_directory}' ---------------------------------------- JMC - Oblivion Mod 'Falcor' p.1-thumb.jpg JMC - Oblivion Mod 'Falcor' p.1.mp4