Add minimal BaseLibraryControllerTest

This commit is contained in:
Thomas Adamcik 2010-04-28 22:56:10 +02:00
parent 5f08dbc213
commit 074da2e542
2 changed files with 18 additions and 1 deletions

View File

@ -13,7 +13,8 @@ from tests import SkipTest
__all__ = ['BaseCurrentPlaylistControllerTest',
'BasePlaybackControllerTest',
'BaseStoredPlaylistsControllerTest']
'BaseStoredPlaylistsControllerTest',
'BaseLibraryControllerTest']
def populate_playlist(func):
def wrapper(self):
@ -963,3 +964,12 @@ class BaseStoredPlaylistsControllerTest(object):
playlist = Playlist(name='test')
self.stored.save(playlist)
self.assert_(playlist in self.stored.playlists)
class BaseLibraryControllerTest(object):
def setUp(self):
self.backend = self.backend_class(mixer=DummyMixer())
self.controller = self.backend.library
def tearDown(self):
self.backend.destroy()

View File

@ -121,5 +121,12 @@ class GStreamerBackendStoredPlaylistsControllerTest(BaseStoredPlaylistsControlle
def test_save_sets_playlist_uri(self):
raise SkipTest
class GStreamerBackendLibraryControllerTest(BaseStoredPlaylistsControllerTest,
unittest.TestCase):
backend_class = GStreamerBackend
if __name__ == '__main__':
unittest.main()