Add test_play_with_consume and test_next_with_consume
This commit is contained in:
parent
865234ce6b
commit
a46184dcf2
@ -117,6 +117,9 @@ class BasePlaybackController(object):
|
||||
self.stop()
|
||||
|
||||
def next(self):
|
||||
if self.consume:
|
||||
self.backend.current_playlist.remove(self.current_track)
|
||||
|
||||
if not self.next_track:
|
||||
self.stop()
|
||||
else:
|
||||
|
||||
@ -648,11 +648,19 @@ class BasePlaybackControllerTest(object):
|
||||
self.playback.volume = 1.0 / 3 * 100
|
||||
self.assertEqual(self.playback.volume, 33)
|
||||
|
||||
@populate_playlist
|
||||
def test_play_with_consume(self):
|
||||
raise NotImplementedError
|
||||
self.playback.consume = True
|
||||
self.playback.play()
|
||||
self.assertEqual(self.playback.current_track, self.tracks[0])
|
||||
|
||||
@populate_playlist
|
||||
def test_next_with_consume(self):
|
||||
raise NotImplementedError
|
||||
self.playback.consume = True
|
||||
self.playback.play()
|
||||
self.playback.next()
|
||||
tracks = self.backend.current_playlist.playlist.tracks
|
||||
self.assert_(self.tracks[0] not in tracks)
|
||||
|
||||
def test_previous_track_with_consume(self):
|
||||
raise NotImplementedError
|
||||
|
||||
Loading…
Reference in New Issue
Block a user