Add test_clear
This commit is contained in:
parent
a724d8f0ff
commit
79b0c19354
@ -21,6 +21,9 @@ class BaseCurrentPlaylistController(object):
|
||||
def add(self, uri, at_position=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def clear(self):
|
||||
self.playlist = Playlist()
|
||||
|
||||
class BasePlaybackController(object):
|
||||
PAUSED = 'paused'
|
||||
PLAYING = 'playing'
|
||||
|
||||
@ -29,6 +29,14 @@ class BaseCurrentPlaylistControllerTest(object):
|
||||
controller.add(uri, len(self.uris)+2)
|
||||
self.assertEqual(uri, controller.playlist.tracks[-1].uri)
|
||||
|
||||
def test_clear(self):
|
||||
self.test_add()
|
||||
controller = self.backend.current_playlist
|
||||
|
||||
controller.clear()
|
||||
|
||||
self.assertEqual(len(controller.playlist.tracks), 0)
|
||||
|
||||
class BasePlaybackControllerTest(object):
|
||||
uris = []
|
||||
backend_class = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user