Add save test

This commit is contained in:
Thomas Adamcik 2010-04-26 21:14:00 +02:00
parent c16dd17484
commit 221d5901fd
2 changed files with 8 additions and 0 deletions

View File

@ -120,3 +120,6 @@ class GStreamerStoredPlaylistsController(BaseStoredPlaylistsController):
renamed = playlist.with_(name=name)
index = self._playlists.index(playlist)
self._playlists[index] = renamed
def save(self, playlist):
self._playlists.append(playlist)

View File

@ -948,3 +948,8 @@ class BaseStoredPlaylistsControllerTest(object):
def test_rename_unknown_playlist(self):
self.stored.rename(Playlist(), 'test2')
def test_save(self):
playlist = Playlist('test')
self.stored.save(playlist)
self.assert_(playlist in self.stored.playlists)