Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_youtube_url():
url = youtube_tools.generate_youtube_url(TRACK_URL, meta_tags)
assert url == EXPECTED_YT_URL
def test_all_categories(self, metadata_fixture):
const.args.music_videos_only = False
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
assert url == EXPECTED_YT_URL
def test_all_categories(self, metadata_fixture):
const.args.music_videos_only = False
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
assert url == EXPECTED_YT_URL
def test_args_manual_none(self, metadata_fixture, monkeypatch):
expect_url = None
monkeypatch.setattr("builtins.input", lambda x: "0")
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
const.args.manual = False
assert url == expect_url
def test_only_music_category(self, metadata_fixture):
const.args.music_videos_only = True
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
assert url == EXPECTED_YT_URL
def test_only_music_category(self, metadata_fixture):
const.args.music_videos_only = True
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
assert url == EXPECTED_YT_URL
def test_args_manual(self, metadata_fixture, monkeypatch):
const.args.manual = True
monkeypatch.setattr("builtins.input", lambda x: "1")
url = youtube_tools.generate_youtube_url(TRACK_SEARCH, metadata_fixture)
assert url == EXPECTED_YT_URL