update unit tests

This commit is contained in:
jbannon 2022-07-21 05:17:11 +00:00
parent 24db509a01
commit c7140a9e07
2 changed files with 8 additions and 11 deletions

View file

@ -25,11 +25,6 @@ def title():
return "entry title"
@pytest.fixture
def description():
return "a description"
@pytest.fixture
def upload_year():
return 2021
@ -79,7 +74,6 @@ def mock_entry_to_dict(
upload_date,
upload_year,
thumbnail_ext,
description,
upload_month,
upload_day,
):
@ -98,14 +92,11 @@ def mock_entry_to_dict(
"upload_day": upload_day,
"upload_day_padded": _pad(upload_day),
"thumbnail_ext": thumbnail_ext,
"description": description,
}
@pytest.fixture
def mock_entry_kwargs(
uid, title, ext, upload_date, extractor, description, download_thumbnail_name
):
def mock_entry_kwargs(uid, title, ext, upload_date, extractor, download_thumbnail_name):
return {
"id": uid,
"extractor": extractor,
@ -113,7 +104,6 @@ def mock_entry_kwargs(
"ext": ext,
"upload_date": upload_date,
"thumbnail": download_thumbnail_name,
"description": description,
}

View file

@ -4,6 +4,11 @@ from ytdl_sub.entries.soundcloud import SoundcloudTrack
from ytdl_sub.entries.youtube import YoutubeVideo
@pytest.fixture
def description():
return "a description"
@pytest.fixture
def playlist_index():
return 1
@ -44,6 +49,7 @@ def mock_youtube_video_to_dict(
"track_title_sanitized": track_title,
"artist": artist,
"artist_sanitized": artist,
"description": description,
}
)
@ -60,6 +66,7 @@ def mock_youtube_video_kwargs(
"channel": channel,
"track": track_title,
"artist": artist,
"description": description,
}
)