Implement _current_playlist_clear
This commit is contained in:
parent
54f538555c
commit
7e94f69e6e
@ -302,7 +302,7 @@ class MpdHandler(object):
|
||||
|
||||
Clears the current playlist.
|
||||
"""
|
||||
raise MpdNotImplemented # TODO
|
||||
self.backend.current_playlist.clear()
|
||||
|
||||
@handle_pattern(r'^move "(?P<songpos>\d+)" "(?P<to>\d+)"$')
|
||||
@handle_pattern(r'^move "(?P<start>\d+):(?P<end>\d+)*" "(?P<to>\d+)"$')
|
||||
|
||||
@ -529,8 +529,12 @@ class CurrentPlaylistHandlerTest(unittest.TestCase):
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_clear(self):
|
||||
self.b.current_playlist.playlist = Playlist(
|
||||
tracks=[Track(), Track(), Track(), Track(), Track()])
|
||||
self.assertEquals(self.b.current_playlist.playlist.length, 5)
|
||||
result = self.h.handle_request(u'clear')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
self.assertEquals(self.b.current_playlist.playlist.length, 0)
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_delete_songpos(self):
|
||||
self.b.current_playlist.playlist = Playlist(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user