Add test_create_in_playlists test
This commit is contained in:
parent
24ac5939f9
commit
2316df7ddc
@ -107,3 +107,4 @@ class GStreamerStoredPlaylistsController(BaseStoredPlaylistsController):
|
||||
def create(self, name):
|
||||
playlist = Playlist(name=name)
|
||||
self._playlists.append(playlist)
|
||||
return playlist
|
||||
|
||||
@ -886,6 +886,10 @@ class BaseStoredPlaylistsControllerTest(object):
|
||||
self.stored = self.backend.stored_playlists
|
||||
|
||||
def test_create(self):
|
||||
self.stored.create('test')
|
||||
playlists = filter(lambda p: p.name == 'test', self.stored.playlists)
|
||||
self.assert_(playlists)
|
||||
playlist = self.stored.create('test')
|
||||
self.assertEqual(playlist.name, 'test')
|
||||
|
||||
def test_create_in_playlists(self):
|
||||
playlist = self.stored.create('test')
|
||||
lists = filter(lambda p: p.name == 'test', self.stored.playlists)
|
||||
self.assert_(lists)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user