Update tests to match spec with respect to version handling

This commit is contained in:
Thomas Adamcik 2010-02-13 21:21:34 +01:00
parent f4f283e741
commit 7ff7c57d55
2 changed files with 4 additions and 5 deletions

View File

@ -38,7 +38,6 @@ class BaseCurrentPlaylistController(object):
def load(self, playlist):
self.playlist = playlist
self.version = 0
def move(self, start, end, to_position):
tracks = self.playlist.tracks

View File

@ -55,11 +55,11 @@ class BaseCurrentPlaylistControllerTest(object):
self.controller.load(new_playlist)
self.assertEqual(new_playlist, self.controller.playlist)
def test_load_resets_version(self):
self.controller.playlist = Playlist()
self.assertNotEqual(self.controller.version, 0)
def test_load_does_not_reset_version(self):
version = self.controller.version
self.controller.load(Playlist())
self.assertEqual(self.controller.version, 0)
self.assertEqual(self.controller.version, version+1)
# FIXME test that player switches to playing new song