Add test to check that "playid -1" resume playback

The problem is, the test shouldn't pass, but it does.
This commit is contained in:
Stein Magnus Jodal 2010-10-04 22:17:03 +02:00
parent d86ffe7d54
commit 8fe261322f

View File

@ -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"')