Skip to content

Commit

Permalink
Add test for download_all_from_feed behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dplocki committed Jan 21, 2024
1 parent 5706fb6 commit 27df5ed
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions e2e/test_simple_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,34 @@ def test_default_behavior_on_nonempty_podcast_directory(

# Assert
podcast_directory.is_containing_only(podcasts_files)


def test_download_all_from_feed_behavior(
feed: FeedBuilder,
use_config: Callable[[Dict], None],
podcast_directory: PodcastDirectory,
):
# Arrange
podcasts_files = call_n_times(generate_random_mp3_file)

for file_name in podcasts_files:
feed.add_entry(file_name=file_name)

use_config(
{
"if_directory_empty": "download_all_from_feed",
"podcasts": [
{
"name": generate_random_string(),
"path": podcast_directory.path(),
"rss_link": feed.get_feed_url(),
}
],
}
)

# Act
run_podcast_downloader()

# Assert
podcast_directory.is_containing_only(podcasts_files)

0 comments on commit 27df5ed

Please sign in to comment.