[BUGFIX] Remove description from Soundcloud source variables (#114)
* [BUGFIX] Remove description from Soundcloud source variable * update unit tests
This commit is contained in:
parent
12a857bf9a
commit
079994c003
4 changed files with 17 additions and 20 deletions
|
|
@ -177,12 +177,3 @@ class EntryVariables(SourceVariables):
|
|||
The uploaded date formatted as YYYY-MM-DD
|
||||
"""
|
||||
return f"{self.upload_year}-{self.upload_month_padded}-{self.upload_day_padded}"
|
||||
|
||||
@property
|
||||
def description(self: BaseEntry) -> str:
|
||||
"""
|
||||
Returns
|
||||
-------
|
||||
The description of the entry.
|
||||
"""
|
||||
return self.kwargs("description")
|
||||
|
|
|
|||
|
|
@ -91,3 +91,12 @@ class YoutubeVideoVariables(EntryVariables):
|
|||
The size of the playlist. For non-playlist download strategies, this will always return 1.
|
||||
"""
|
||||
return 1
|
||||
|
||||
@property
|
||||
def description(self: BaseEntry) -> str:
|
||||
"""
|
||||
Returns
|
||||
-------
|
||||
The description of the entry.
|
||||
"""
|
||||
return self.kwargs("description")
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue