1 # -*- coding: utf-8 -*-
5 from sima.lib.track import Track
9 'albumartist': ['Devolt', 'Devolt Band'],
10 'albumartistsort': 'Devolt',
14 'file': 'gberret.music/Devolt/2011-Grey/03-Devolt - Crazy.mp3',
15 'last-modified': '2012-04-02T20:48:59Z',
16 'musicbrainz_albumartistid': 'd8e7e3e2-49ab-4f7c-b148-fc946d521f99',
17 'musicbrainz_albumid': 'ea2ef2cf-59e1-443a-817e-9066e3e0be4b',
18 'musicbrainz_artistid': 'd8e7e3e2-49ab-4f7c-b148-fc946d521f99',
19 'musicbrainz_trackid': 'fabf8fc9-2ae5-49c9-8214-a839c958d872',
25 class TestTrackObject(unittest.TestCase):
27 def test_tagcollapse(self):
29 self.assertTrue(trk.collapse_tags_bool, 'Should have collapsed a tag')
30 self.assertFalse(isinstance(trk.albumartist, list), 'Failed to collapse albumartist tag')
32 def test_boolean_type(self):
33 self.assertFalse(bool(Track()))
35 def test_albumartist(self):
36 trk = Track(albumartist='album_artist', artist='track_artist')
37 self.assertEqual(trk.get_artist().name, 'album_artist')
38 trk = Track(artist='track_artist')
39 self.assertEqual(trk.get_artist().name, 'track_artist')
41 # vim: ai ts=4 sw=4 sts=4 expandtab