mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Introduce usage of black (code formatter) (#393)
This commit is contained in:
committed by
Ritiek Malhotra
parent
71ee6ad5e2
commit
13c83bd225
@@ -6,8 +6,8 @@ import pytest
|
||||
|
||||
|
||||
def load_defaults():
|
||||
const.args = handle.get_arguments(raw_args='', to_group=False, to_merge=False)
|
||||
const.args.overwrite = 'skip'
|
||||
const.args = handle.get_arguments(raw_args="", to_group=False, to_merge=False)
|
||||
const.args.overwrite = "skip"
|
||||
const.args.log_level = 10
|
||||
|
||||
spotdl.args = const.args
|
||||
|
||||
@@ -7,14 +7,14 @@ import loader
|
||||
|
||||
loader.load_defaults()
|
||||
|
||||
TRACK_URL = 'http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU'
|
||||
TRACK_URL = "http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU"
|
||||
|
||||
|
||||
def test_dry_download_list(tmpdir):
|
||||
const.args.folder = str(tmpdir)
|
||||
const.args.dry_run = True
|
||||
file_path = os.path.join(const.args.folder, 'test_list.txt')
|
||||
with open(file_path, 'w') as f:
|
||||
file_path = os.path.join(const.args.folder, "test_list.txt")
|
||||
with open(file_path, "w") as f:
|
||||
f.write(TRACK_URL)
|
||||
downloaded_song, *_ = spotdl.download_list(file_path)
|
||||
assert downloaded_song == TRACK_URL
|
||||
|
||||
@@ -11,36 +11,37 @@ import yaml
|
||||
|
||||
def test_log_str_to_int():
|
||||
expect_levels = [20, 30, 40, 10]
|
||||
levels = [handle.log_leveller(level)
|
||||
for level in handle._LOG_LEVELS_STR]
|
||||
levels = [handle.log_leveller(level) for level in handle._LOG_LEVELS_STR]
|
||||
assert levels == expect_levels
|
||||
|
||||
|
||||
class TestConfig:
|
||||
def test_default_config(self, tmpdir):
|
||||
expect_config = handle.default_conf['spotify-downloader']
|
||||
expect_config = handle.default_conf["spotify-downloader"]
|
||||
global config_path
|
||||
config_path = os.path.join(str(tmpdir), 'config.yml')
|
||||
config_path = os.path.join(str(tmpdir), "config.yml")
|
||||
config = handle.get_config(config_path)
|
||||
assert config == expect_config
|
||||
|
||||
def test_modified_config(self):
|
||||
global modified_config
|
||||
modified_config = dict(handle.default_conf)
|
||||
modified_config['spotify-downloader']['file-format'] = 'just_a_test'
|
||||
modified_config["spotify-downloader"]["file-format"] = "just_a_test"
|
||||
merged_config = handle.merge(handle.default_conf, modified_config)
|
||||
assert merged_config == modified_config
|
||||
|
||||
def test_custom_config_path(self, tmpdir):
|
||||
parser = argparse.ArgumentParser()
|
||||
with open(config_path, 'w') as config_file:
|
||||
with open(config_path, "w") as config_file:
|
||||
yaml.dump(modified_config, config_file, default_flow_style=False)
|
||||
overridden_config = handle.override_config(config_path,
|
||||
parser,
|
||||
raw_args='')
|
||||
modified_values = [ str(value) for value in modified_config['spotify-downloader'].values() ]
|
||||
overridden_config = handle.override_config(config_path, parser, raw_args="")
|
||||
modified_values = [
|
||||
str(value) for value in modified_config["spotify-downloader"].values()
|
||||
]
|
||||
overridden_config.folder = os.path.realpath(overridden_config.folder)
|
||||
overridden_values = [ str(value) for value in overridden_config.__dict__.values() ]
|
||||
overridden_values = [
|
||||
str(value) for value in overridden_config.__dict__.values()
|
||||
]
|
||||
assert sorted(overridden_values) == sorted(modified_values)
|
||||
|
||||
|
||||
|
||||
@@ -8,38 +8,47 @@ import pytest
|
||||
|
||||
|
||||
DUPLICATE_TRACKS_TEST_TABLE = [
|
||||
(('https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',
|
||||
'https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ'),
|
||||
('https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',)),
|
||||
|
||||
(('https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',
|
||||
'',
|
||||
'https://open.spotify.com/track/3SipFlNddvL0XNZRLXvdZD'),
|
||||
('https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',
|
||||
'https://open.spotify.com/track/3SipFlNddvL0XNZRLXvdZD')),
|
||||
|
||||
(('ncs fade',
|
||||
'https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',
|
||||
'',
|
||||
'ncs fade'),
|
||||
('ncs fade',
|
||||
'https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ')),
|
||||
|
||||
(('ncs spectre ',
|
||||
' https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ',
|
||||
''),
|
||||
('ncs spectre',
|
||||
'https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ'))
|
||||
(
|
||||
(
|
||||
"https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",
|
||||
"https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",
|
||||
),
|
||||
("https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",),
|
||||
),
|
||||
(
|
||||
(
|
||||
"https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",
|
||||
"",
|
||||
"https://open.spotify.com/track/3SipFlNddvL0XNZRLXvdZD",
|
||||
),
|
||||
(
|
||||
"https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",
|
||||
"https://open.spotify.com/track/3SipFlNddvL0XNZRLXvdZD",
|
||||
),
|
||||
),
|
||||
(
|
||||
(
|
||||
"ncs fade",
|
||||
"https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ",
|
||||
"",
|
||||
"ncs fade",
|
||||
),
|
||||
("ncs fade", "https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ"),
|
||||
),
|
||||
(
|
||||
("ncs spectre ", " https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ", ""),
|
||||
("ncs spectre", "https://open.spotify.com/track/2DGa7iaidT5s0qnINlwMjJ"),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
def test_default_music_directory():
|
||||
if sys.platform.startswith('linux'):
|
||||
output = subprocess.check_output(['xdg-user-dir', 'MUSIC'])
|
||||
expect_directory = output.decode('utf-8').rstrip()
|
||||
if sys.platform.startswith("linux"):
|
||||
output = subprocess.check_output(["xdg-user-dir", "MUSIC"])
|
||||
expect_directory = output.decode("utf-8").rstrip()
|
||||
else:
|
||||
home = os.path.expanduser('~')
|
||||
expect_directory = os.path.join(home, 'Music')
|
||||
home = os.path.expanduser("~")
|
||||
expect_directory = os.path.join(home, "Music")
|
||||
|
||||
directory = internals.get_music_dir()
|
||||
assert directory == expect_directory
|
||||
@@ -49,15 +58,15 @@ class TestPathFilterer:
|
||||
def test_create_directory(self, tmpdir):
|
||||
expect_path = True
|
||||
global folder_path
|
||||
folder_path = os.path.join(str(tmpdir), 'filter_this_folder')
|
||||
folder_path = os.path.join(str(tmpdir), "filter_this_folder")
|
||||
internals.filter_path(folder_path)
|
||||
is_path = os.path.isdir(folder_path)
|
||||
assert is_path == expect_path
|
||||
|
||||
def test_remove_temp_files(self, tmpdir):
|
||||
expect_file = False
|
||||
file_path = os.path.join(folder_path, 'pesky_file.temp')
|
||||
open(file_path, 'a')
|
||||
file_path = os.path.join(folder_path, "pesky_file.temp")
|
||||
open(file_path, "a")
|
||||
internals.filter_path(folder_path)
|
||||
is_file = os.path.isfile(file_path)
|
||||
assert is_file == expect_file
|
||||
@@ -65,17 +74,17 @@ class TestPathFilterer:
|
||||
|
||||
class TestVideoTimeFromSeconds:
|
||||
def test_from_seconds(self):
|
||||
expect_duration = '35'
|
||||
expect_duration = "35"
|
||||
duration = internals.videotime_from_seconds(35)
|
||||
assert duration == expect_duration
|
||||
|
||||
def test_from_minutes(self):
|
||||
expect_duration = '2:38'
|
||||
expect_duration = "2:38"
|
||||
duration = internals.videotime_from_seconds(158)
|
||||
assert duration == expect_duration
|
||||
|
||||
def test_from_hours(self):
|
||||
expect_duration = '1:16:02'
|
||||
expect_duration = "1:16:02"
|
||||
duration = internals.videotime_from_seconds(4562)
|
||||
assert duration == expect_duration
|
||||
|
||||
@@ -83,37 +92,37 @@ class TestVideoTimeFromSeconds:
|
||||
class TestGetSeconds:
|
||||
def test_from_seconds(self):
|
||||
expect_secs = 45
|
||||
secs = internals.get_sec('0:45')
|
||||
secs = internals.get_sec("0:45")
|
||||
assert secs == expect_secs
|
||||
secs = internals.get_sec('0.45')
|
||||
secs = internals.get_sec("0.45")
|
||||
assert secs == expect_secs
|
||||
|
||||
def test_from_minutes(self):
|
||||
expect_secs = 213
|
||||
secs = internals.get_sec('3.33')
|
||||
secs = internals.get_sec("3.33")
|
||||
assert secs == expect_secs
|
||||
secs = internals.get_sec('3:33')
|
||||
secs = internals.get_sec("3:33")
|
||||
assert secs == expect_secs
|
||||
|
||||
def test_from_hours(self):
|
||||
expect_secs = 5405
|
||||
secs = internals.get_sec('1.30.05')
|
||||
secs = internals.get_sec("1.30.05")
|
||||
assert secs == expect_secs
|
||||
secs = internals.get_sec('1:30:05')
|
||||
secs = internals.get_sec("1:30:05")
|
||||
assert secs == expect_secs
|
||||
|
||||
def test_raise_error(self):
|
||||
with pytest.raises(ValueError):
|
||||
internals.get_sec('10*05')
|
||||
internals.get_sec("10*05")
|
||||
with pytest.raises(ValueError):
|
||||
internals.get_sec('02,28,46')
|
||||
internals.get_sec("02,28,46")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("duplicates, expected", DUPLICATE_TRACKS_TEST_TABLE)
|
||||
def test_get_unique_tracks(tmpdir, duplicates, expected):
|
||||
file_path = os.path.join(str(tmpdir), 'test_duplicates.txt')
|
||||
with open(file_path, 'w') as f:
|
||||
f.write('\n'.join(duplicates))
|
||||
file_path = os.path.join(str(tmpdir), "test_duplicates.txt")
|
||||
with open(file_path, "w") as f:
|
||||
f.write("\n".join(duplicates))
|
||||
|
||||
unique_tracks = internals.get_unique_tracks(file_path)
|
||||
assert tuple(unique_tracks) == expected
|
||||
|
||||
@@ -5,25 +5,25 @@ from spotdl import spotify_tools
|
||||
from spotdl import const
|
||||
from spotdl import spotdl
|
||||
|
||||
PLAYLIST_URL = 'https://open.spotify.com/user/alex/playlist/0iWOVoumWlkXIrrBTSJmN8'
|
||||
ALBUM_URL = 'https://open.spotify.com/album/499J8bIsEnU7DSrosFDJJg'
|
||||
PLAYLIST_URL = "https://open.spotify.com/user/alex/playlist/0iWOVoumWlkXIrrBTSJmN8"
|
||||
ALBUM_URL = "https://open.spotify.com/album/499J8bIsEnU7DSrosFDJJg"
|
||||
|
||||
|
||||
def test_user_playlists(tmpdir, monkeypatch):
|
||||
expect_tracks = 14
|
||||
text_file = os.path.join(str(tmpdir), 'test_us.txt')
|
||||
monkeypatch.setattr('builtins.input', lambda x: 1)
|
||||
spotify_tools.write_user_playlist('alex', text_file)
|
||||
with open(text_file, 'r') as f:
|
||||
text_file = os.path.join(str(tmpdir), "test_us.txt")
|
||||
monkeypatch.setattr("builtins.input", lambda x: 1)
|
||||
spotify_tools.write_user_playlist("alex", text_file)
|
||||
with open(text_file, "r") as f:
|
||||
tracks = len(f.readlines())
|
||||
assert tracks == expect_tracks
|
||||
|
||||
|
||||
def test_playlist(tmpdir):
|
||||
expect_tracks = 14
|
||||
text_file = os.path.join(str(tmpdir), 'test_pl.txt')
|
||||
text_file = os.path.join(str(tmpdir), "test_pl.txt")
|
||||
spotify_tools.write_playlist(PLAYLIST_URL, text_file)
|
||||
with open(text_file, 'r') as f:
|
||||
with open(text_file, "r") as f:
|
||||
tracks = len(f.readlines())
|
||||
assert tracks == expect_tracks
|
||||
|
||||
@@ -31,22 +31,22 @@ def test_playlist(tmpdir):
|
||||
def test_album(tmpdir):
|
||||
expect_tracks = 15
|
||||
global text_file
|
||||
text_file = os.path.join(str(tmpdir), 'test_al.txt')
|
||||
text_file = os.path.join(str(tmpdir), "test_al.txt")
|
||||
spotify_tools.write_album(ALBUM_URL, text_file)
|
||||
with open(text_file, 'r') as f:
|
||||
with open(text_file, "r") as f:
|
||||
tracks = len(f.readlines())
|
||||
assert tracks == expect_tracks
|
||||
|
||||
|
||||
def test_trim():
|
||||
with open(text_file, 'r') as track_file:
|
||||
with open(text_file, "r") as track_file:
|
||||
tracks = track_file.readlines()
|
||||
|
||||
expect_number = len(tracks) - 1
|
||||
expect_track = tracks[0]
|
||||
track = spotdl.internals.trim_song(text_file)
|
||||
|
||||
with open(text_file, 'r') as track_file:
|
||||
with open(text_file, "r") as track_file:
|
||||
number = len(track_file.readlines())
|
||||
|
||||
assert expect_number == number and expect_track == track
|
||||
|
||||
@@ -12,10 +12,10 @@ import loader
|
||||
|
||||
loader.load_defaults()
|
||||
|
||||
TRACK_URL = 'http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU'
|
||||
EXPECTED_TITLE = 'David André Østby - Intro'
|
||||
EXPECTED_YT_TITLE = 'Intro - David André Østby'
|
||||
EXPECTED_YT_URL = 'http://youtube.com/watch?v=rg1wfcty0BA'
|
||||
TRACK_URL = "http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU"
|
||||
EXPECTED_TITLE = "David André Østby - Intro"
|
||||
EXPECTED_YT_TITLE = "Intro - David André Østby"
|
||||
EXPECTED_YT_URL = "http://youtube.com/watch?v=rg1wfcty0BA"
|
||||
|
||||
|
||||
def test_metadata():
|
||||
@@ -33,7 +33,7 @@ class TestFileFormat:
|
||||
def test_without_spaces(self):
|
||||
const.args.no_spaces = True
|
||||
title = internals.format_string(const.args.file_format, meta_tags)
|
||||
assert title == EXPECTED_TITLE.replace(' ', '_')
|
||||
assert title == EXPECTED_TITLE.replace(" ", "_")
|
||||
|
||||
|
||||
def test_youtube_url():
|
||||
@@ -62,60 +62,58 @@ def test_check_track_exists_before_download(tmpdir):
|
||||
class TestDownload:
|
||||
def test_m4a(self):
|
||||
expect_download = True
|
||||
download = youtube_tools.download_song(file_name + '.m4a', content)
|
||||
download = youtube_tools.download_song(file_name + ".m4a", content)
|
||||
assert download == expect_download
|
||||
|
||||
def test_webm(self):
|
||||
expect_download = True
|
||||
download = youtube_tools.download_song(file_name + '.webm', content)
|
||||
download = youtube_tools.download_song(file_name + ".webm", content)
|
||||
assert download == expect_download
|
||||
|
||||
|
||||
class TestFFmpeg:
|
||||
def test_convert_from_webm_to_mp3(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.webm',
|
||||
file_name + '.mp3',
|
||||
const.args.folder)
|
||||
return_code = convert.song(
|
||||
file_name + ".webm", file_name + ".mp3", const.args.folder
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
def test_convert_from_webm_to_m4a(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.webm',
|
||||
file_name + '.m4a',
|
||||
const.args.folder)
|
||||
return_code = convert.song(
|
||||
file_name + ".webm", file_name + ".m4a", const.args.folder
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
|
||||
def test_convert_from_m4a_to_mp3(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.m4a',
|
||||
file_name + '.mp3',
|
||||
const.args.folder)
|
||||
return_code = convert.song(
|
||||
file_name + ".m4a", file_name + ".mp3", const.args.folder
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
def test_convert_from_m4a_to_webm(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.m4a',
|
||||
file_name + '.webm',
|
||||
const.args.folder)
|
||||
return_code = convert.song(
|
||||
file_name + ".m4a", file_name + ".webm", const.args.folder
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
def test_convert_from_m4a_to_flac(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.m4a',
|
||||
file_name + '.flac',
|
||||
const.args.folder)
|
||||
return_code = convert.song(
|
||||
file_name + ".m4a", file_name + ".flac", const.args.folder
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
|
||||
class TestAvconv:
|
||||
def test_convert_from_m4a_to_mp3(self):
|
||||
expect_return_code = 0
|
||||
return_code = convert.song(file_name + '.m4a',
|
||||
file_name + '.mp3',
|
||||
const.args.folder,
|
||||
avconv=True)
|
||||
return_code = convert.song(
|
||||
file_name + ".m4a", file_name + ".mp3", const.args.folder, avconv=True
|
||||
)
|
||||
assert return_code == expect_return_code
|
||||
|
||||
|
||||
@@ -124,30 +122,30 @@ class TestEmbedMetadata:
|
||||
expect_embed = True
|
||||
global track_path
|
||||
track_path = os.path.join(const.args.folder, file_name)
|
||||
embed = metadata.embed(track_path + '.mp3', meta_tags)
|
||||
embed = metadata.embed(track_path + ".mp3", meta_tags)
|
||||
assert embed == expect_embed
|
||||
|
||||
def test_embed_in_m4a(self):
|
||||
expect_embed = True
|
||||
embed = metadata.embed(track_path + '.m4a', meta_tags)
|
||||
os.remove(track_path + '.m4a')
|
||||
embed = metadata.embed(track_path + ".m4a", meta_tags)
|
||||
os.remove(track_path + ".m4a")
|
||||
assert embed == expect_embed
|
||||
|
||||
def test_embed_in_webm(self):
|
||||
expect_embed = False
|
||||
embed = metadata.embed(track_path + '.webm', meta_tags)
|
||||
os.remove(track_path + '.webm')
|
||||
embed = metadata.embed(track_path + ".webm", meta_tags)
|
||||
os.remove(track_path + ".webm")
|
||||
assert embed == expect_embed
|
||||
|
||||
def test_embed_in_flac(self):
|
||||
expect_embed = True
|
||||
embed = metadata.embed(track_path + '.flac', meta_tags)
|
||||
os.remove(track_path + '.flac')
|
||||
embed = metadata.embed(track_path + ".flac", meta_tags)
|
||||
os.remove(track_path + ".flac")
|
||||
assert embed == expect_embed
|
||||
|
||||
|
||||
def test_check_track_exists_after_download():
|
||||
expect_check = True
|
||||
check = spotdl.check_exists(file_name, TRACK_URL, meta_tags)
|
||||
os.remove(track_path + '.mp3')
|
||||
os.remove(track_path + ".mp3")
|
||||
assert check == expect_check
|
||||
|
||||
@@ -11,17 +11,17 @@ import loader
|
||||
|
||||
loader.load_defaults()
|
||||
|
||||
YT_API_KEY = 'AIzaSyAnItl3udec-Q1d5bkjKJGL-RgrKO_vU90'
|
||||
YT_API_KEY = "AIzaSyAnItl3udec-Q1d5bkjKJGL-RgrKO_vU90"
|
||||
|
||||
TRACK_SEARCH = "Tony's Videos VERY SHORT VIDEO 28.10.2016"
|
||||
EXPECTED_TITLE = TRACK_SEARCH
|
||||
EXPECTED_YT_URL = 'http://youtube.com/watch?v=qOOcy2-tmbk'
|
||||
EXPECTED_YT_URLS = (EXPECTED_YT_URL, 'http://youtube.com/watch?v=5USR1Omo7f0')
|
||||
EXPECTED_YT_URL = "http://youtube.com/watch?v=qOOcy2-tmbk"
|
||||
EXPECTED_YT_URLS = (EXPECTED_YT_URL, "http://youtube.com/watch?v=5USR1Omo7f0")
|
||||
|
||||
RESULT_COUNT_SEARCH = "she is still sleeping SAO"
|
||||
|
||||
EXPECTED_YT_API_KEY = 'AIzaSyC6cEeKlxtOPybk9sEe5ksFN5sB-7wzYp0'
|
||||
EXPECTED_YT_API_KEY_CUSTOM = 'some_api_key'
|
||||
EXPECTED_YT_API_KEY = "AIzaSyC6cEeKlxtOPybk9sEe5ksFN5sB-7wzYp0"
|
||||
EXPECTED_YT_API_KEY_CUSTOM = "some_api_key"
|
||||
|
||||
|
||||
class TestYouTubeAPIKeys:
|
||||
@@ -76,13 +76,13 @@ class TestYouTubeURL:
|
||||
|
||||
def test_args_manual(self, monkeypatch):
|
||||
const.args.manual = True
|
||||
monkeypatch.setattr('builtins.input', lambda x: '1')
|
||||
monkeypatch.setattr("builtins.input", lambda x: "1")
|
||||
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata)
|
||||
assert url == EXPECTED_YT_URL
|
||||
|
||||
def test_args_manual_none(self, monkeypatch):
|
||||
expect_url = None
|
||||
monkeypatch.setattr('builtins.input', lambda x: '0')
|
||||
monkeypatch.setattr("builtins.input", lambda x: "0")
|
||||
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata)
|
||||
const.args.manual = False
|
||||
assert url == expect_url
|
||||
@@ -120,10 +120,10 @@ class TestDownload:
|
||||
def test_webm(self):
|
||||
# content does not have any .webm audiostream
|
||||
expect_download = False
|
||||
download = youtube_tools.download_song(file_name + '.webm', content)
|
||||
download = youtube_tools.download_song(file_name + ".webm", content)
|
||||
assert download == expect_download
|
||||
|
||||
def test_other(self):
|
||||
expect_download = False
|
||||
download = youtube_tools.download_song(file_name + '.fake_extension', content)
|
||||
download = youtube_tools.download_song(file_name + ".fake_extension", content)
|
||||
assert download == expect_download
|
||||
|
||||
Reference in New Issue
Block a user