示例#1
0
 def test_match_no_bonus(self):
     """match should return the score bonus for the tracks being compared
     
     number of points depends on whether track/artist/album has been matched
     """
     track2 = SelectionTrack.get_testing_instance()
     track2._id = ""
     track2._album_id = ""
     track2._artist_ids = [""]
     self.assertEquals(self.track.match(track2), 0)
 def test_normal(self):
     lib = SelectionLibrary([test_track])
     tracks = lib.get_tracks()
     self.assertEqual(tracks[0].get_id(), SelectionTrack(test_track).get_id())
示例#3
0
 def setUpClass(cls):
     cls.track = SelectionTrack.get_testing_instance()
示例#4
0
    def __init__(self, tracks):
        if type(tracks) is not list:
            raise TypeError()

        self._tracks = [SelectionTrack(track) for track in tracks]