mpd: Deleting unkown playlist should return not found
This commit is contained in:
parent
593f4e295b
commit
98e19e803b
@ -328,6 +328,8 @@ def rm(context, name):
|
||||
Removes the playlist ``NAME.m3u`` from the playlist directory.
|
||||
"""
|
||||
uri = context.lookup_playlist_uri_from_name(name)
|
||||
if not uri:
|
||||
raise exceptions.MpdNoExistError('No such playlist')
|
||||
context.core.playlists.delete(uri).get()
|
||||
|
||||
|
||||
|
||||
@ -330,6 +330,10 @@ class PlaylistsHandlerTest(protocol.BaseTestCase):
|
||||
self.assertInResponse('OK')
|
||||
self.assertIsNone(self.backend.playlists.lookup('dummy:a1').get())
|
||||
|
||||
def test_rm_unknown_playlist_acks(self):
|
||||
self.send_request('rm "name"')
|
||||
self.assertInResponse('ACK [50@0] {rm} No such playlist')
|
||||
|
||||
def test_save(self):
|
||||
self.send_request('save "name"')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user