From 6c538ba947e60ef67d34eeed82ca267150fd0aea Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 28 Feb 2010 17:14:29 +0100 Subject: [PATCH] Add extra asserts to _current_playlist_deleteid tests --- tests/mpd/handlertest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/mpd/handlertest.py b/tests/mpd/handlertest.py index c919dd5b..7a453216 100644 --- a/tests/mpd/handlertest.py +++ b/tests/mpd/handlertest.py @@ -569,12 +569,17 @@ class CurrentPlaylistHandlerTest(unittest.TestCase): self.assert_(u'ACK Position out of bounds' in result) def test_deleteid(self): - self.b.current_playlist.load(Playlist(tracks=[Track(id=0)])) + self.b.current_playlist.load(Playlist(tracks=[Track(id=0), Track()])) + self.assertEquals(self.b.current_playlist.playlist.length, 2) result = self.h.handle_request(u'deleteid "0"') + self.assertEquals(self.b.current_playlist.playlist.length, 1) self.assert_(u'OK' in result) def test_deleteid_does_not_exist(self): + self.b.current_playlist.load(Playlist(tracks=[Track(id=1), Track()])) + self.assertEquals(self.b.current_playlist.playlist.length, 2) result = self.h.handle_request(u'deleteid "0"') + self.assertEquals(self.b.current_playlist.playlist.length, 2) self.assert_(u'ACK Track with ID "0" not found' in result) def test_move_songpos(self):