From 8fe261322f0f534ca8ac0d1ec59ecdf376e91abc Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 4 Oct 2010 22:17:03 +0200 Subject: [PATCH] Add test to check that "playid -1" resume playback The problem is, the test shouldn't pass, but it does. --- tests/frontends/mpd/playback_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/frontends/mpd/playback_test.py b/tests/frontends/mpd/playback_test.py index 3ba48a54..64cdf5a6 100644 --- a/tests/frontends/mpd/playback_test.py +++ b/tests/frontends/mpd/playback_test.py @@ -285,6 +285,17 @@ class PlaybackControlHandlerTest(unittest.TestCase): self.assertEqual(self.b.playback.STOPPED, self.b.playback.state) self.assertEqual(self.b.playback.current_track, None) + def test_playid_minus_one_resumes_if_paused(self): + self.b.current_playlist.append([Track(length=40000)]) + self.b.playback.seek(30000) + self.b.playback.pause() + result = self.h.handle_request(u'playid "-1"') + self.assert_(u'OK' in result) + self.assertEqual(self.b.playback.PLAYING, self.b.playback.state) + self.assert_(self.b.playback.time_position >= 30000) + self.fail(u'This test should fail, but it does not. ' + 'The functionality is not implemented.') + def test_playid_which_does_not_exist(self): self.b.current_playlist.append([Track()]) result = self.h.handle_request(u'playid "12345"')