update unit tests
This commit is contained in:
parent
24db509a01
commit
c7140a9e07
2 changed files with 8 additions and 11 deletions
|
|
@ -25,11 +25,6 @@ def title():
|
||||||
return "entry title"
|
return "entry title"
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def description():
|
|
||||||
return "a description"
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def upload_year():
|
def upload_year():
|
||||||
return 2021
|
return 2021
|
||||||
|
|
@ -79,7 +74,6 @@ def mock_entry_to_dict(
|
||||||
upload_date,
|
upload_date,
|
||||||
upload_year,
|
upload_year,
|
||||||
thumbnail_ext,
|
thumbnail_ext,
|
||||||
description,
|
|
||||||
upload_month,
|
upload_month,
|
||||||
upload_day,
|
upload_day,
|
||||||
):
|
):
|
||||||
|
|
@ -98,14 +92,11 @@ def mock_entry_to_dict(
|
||||||
"upload_day": upload_day,
|
"upload_day": upload_day,
|
||||||
"upload_day_padded": _pad(upload_day),
|
"upload_day_padded": _pad(upload_day),
|
||||||
"thumbnail_ext": thumbnail_ext,
|
"thumbnail_ext": thumbnail_ext,
|
||||||
"description": description,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_entry_kwargs(
|
def mock_entry_kwargs(uid, title, ext, upload_date, extractor, download_thumbnail_name):
|
||||||
uid, title, ext, upload_date, extractor, description, download_thumbnail_name
|
|
||||||
):
|
|
||||||
return {
|
return {
|
||||||
"id": uid,
|
"id": uid,
|
||||||
"extractor": extractor,
|
"extractor": extractor,
|
||||||
|
|
@ -113,7 +104,6 @@ def mock_entry_kwargs(
|
||||||
"ext": ext,
|
"ext": ext,
|
||||||
"upload_date": upload_date,
|
"upload_date": upload_date,
|
||||||
"thumbnail": download_thumbnail_name,
|
"thumbnail": download_thumbnail_name,
|
||||||
"description": description,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ from ytdl_sub.entries.soundcloud import SoundcloudTrack
|
||||||
from ytdl_sub.entries.youtube import YoutubeVideo
|
from ytdl_sub.entries.youtube import YoutubeVideo
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def description():
|
||||||
|
return "a description"
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def playlist_index():
|
def playlist_index():
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -44,6 +49,7 @@ def mock_youtube_video_to_dict(
|
||||||
"track_title_sanitized": track_title,
|
"track_title_sanitized": track_title,
|
||||||
"artist": artist,
|
"artist": artist,
|
||||||
"artist_sanitized": artist,
|
"artist_sanitized": artist,
|
||||||
|
"description": description,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -60,6 +66,7 @@ def mock_youtube_video_kwargs(
|
||||||
"channel": channel,
|
"channel": channel,
|
||||||
"track": track_title,
|
"track": track_title,
|
||||||
"artist": artist,
|
"artist": artist,
|
||||||
|
"description": description,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue