v0.98.1: a playlist's Imported from link can be typed in Get Info, for playlists imported before it was kept
This commit is contained in:
@@ -555,6 +555,11 @@ def test_the_dialog_reports_name_and_cover_changes(qapp):
|
||||
assert dialog.new_name() == "Mix 2" and dialog.art_change() == b""
|
||||
dialog._on_art_staged(PNG, "image/png")
|
||||
assert dialog.art_change() == PNG
|
||||
assert dialog.source_change() is None
|
||||
dialog._source.setText(" ")
|
||||
assert dialog.source_change() == "" # cleared
|
||||
dialog._source.setText("https://open.spotify.com/playlist/z")
|
||||
assert dialog.source_change() == "https://open.spotify.com/playlist/z"
|
||||
|
||||
|
||||
def test_get_info_ok_renames_and_sets_the_cover(window, qapp, monkeypatch,
|
||||
@@ -575,11 +580,16 @@ def test_get_info_ok_renames_and_sets_the_cover(window, qapp, monkeypatch,
|
||||
return True
|
||||
def new_name(self):
|
||||
return "New Name"
|
||||
def source_change(self):
|
||||
return "https://open.spotify.com/playlist/abc"
|
||||
def art_change(self):
|
||||
return bmp.read_bytes()
|
||||
monkeypatch.setattr(mw, "PlaylistInfoDialog", _Dialog)
|
||||
window._playlist_info(playlist.persistent_id)
|
||||
assert playlist.name == "New Name"
|
||||
assert playlist.source_url == "https://open.spotify.com/playlist/abc"
|
||||
manager.undo_stack.undo() # the link edit is its own step
|
||||
assert playlist.source_url == ""
|
||||
saved = playlist_art.find(manager.data_dir, playlist.persistent_id)
|
||||
assert saved.suffix == ".png"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user