Add test for minimal 'blank' tag_cache

This commit is contained in:
Thomas Adamcik 2010-04-30 19:51:49 +02:00
parent 9e798916bd
commit b84c9e3eff
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,10 @@
info_begin
mpd_version: 0.14.2
fs_charset: UTF-8
info_end
songList begin
key: song1.mp3
file: /song1.mp3
Time: 4
mtime: 1272319626
songList end

View File

@ -108,3 +108,14 @@ class MPDTagCacheToTracksTest(unittest.TestCase):
def test_misencoded_cache(self):
# FIXME not sure if this can happen
raise SkipTest
def test_cache_with_blank_track_info(self):
tracks, artists, albums = parse_mpd_tag_cache(data_folder('blank_tag_cache'),
data_folder(''))
uri = 'file://' + urllib.pathname2url(data_folder('song1.mp3'))
self.assertEqual(set([Track(uri=uri, length=4000)]), tracks)
self.assertEqual(set(), artists)
self.assertEqual(set(), albums)