fixed test_seek and test_seekid

This commit is contained in:
Johannes Knutsen 2010-08-14 15:44:05 +02:00
parent 5d9fd5b625
commit fe9ad74e1b

View File

@ -271,17 +271,17 @@ class PlaybackControlHandlerTest(unittest.TestCase):
self.assert_(u'OK' in result)
def test_seek(self):
self.b.current_playlist.load([Track()])
self.b.current_playlist.load([Track(length=40000)])
self.h.handle_request(u'seek "0"')
result = self.h.handle_request(u'seek "0" "30"')
self.assert_(u'OK' in result)
self.assert_(self.b.playback.time_position > 30000)
self.assert_(self.b.playback.time_position >= 30000)
def test_seekid(self):
self.b.current_playlist.load([Track()])
result = self.h.handle_request(u'seekid "0" "30"')
self.b.current_playlist.load([Track(length=40000)])
result = self.h.handle_request(u'seekid "1" "30"')
self.assert_(u'OK' in result)
self.assert_(self.b.playback.time_position > 30000)
self.assert_(self.b.playback.time_position >= 30000)
def test_stop(self):