Fix BaseCurrentPlaylistControllerTest.test_load

This commit is contained in:
Thomas Adamcik 2010-04-05 21:27:53 +02:00
parent 5623e26cc7
commit b126311f18
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,7 @@ class GStreamerBackend(BaseBackend):
self.playback = GStreamerPlaybackController(self)
self.current_playlist = BaseCurrentPlaylistController(self)
class GStreamerPlaybackController(BasePlaybackController):
def __init__(self, backend):
super(GStreamerPlaybackController, self).__init__(backend)

View File

@ -13,6 +13,7 @@ def populate_playlist(func):
wrapper.__doc__ = func.__doc__
return wrapper
class BaseCurrentPlaylistControllerTest(object):
tracks = []
backend_class = None
@ -84,7 +85,8 @@ class BaseCurrentPlaylistControllerTest(object):
new_playlist = Playlist()
self.assertNotEqual(new_playlist, self.controller.playlist)
self.controller.load(new_playlist)
self.assertEqual(new_playlist, self.controller.playlist)
# FIXME how do we test this without going into internals?
self.assertEqual(new_playlist, self.controller._playlist)
def test_load_does_not_reset_version(self):
version = self.controller.version
@ -188,6 +190,7 @@ class BaseCurrentPlaylistControllerTest(object):
self.controller.playlist = Playlist()
self.assertEqual(version+1, self.controller.version)
class BasePlaybackControllerTest(object):
tracks = []
backend_class = None