def test_get_flac_tags(self):
     with TemporaryDirectory() as tmp:
         self.create_flac_file(join(tmp, 'tmp.flac'))
         self.assertEquals({'ALBUM': 'album', 'TITLE': 'title', 'ARTIST': 'artist', 'TRACKTOTAL': '15', 'DATE': '2008',
                            'DESCRIPTION': 'description', 'GENRE': 'Electronic', 'TRACKNUMBER': '1', 'COPYRIGHT': 'copyright'},
             get_flac_tags(get_vobis_comment_bloc(join(tmp, 'tmp.flac'))))
Example #2
0
 def test_get_flac_tags_two_comments_with_carriage_return(self):
     self.assertEquals({"DESCRIPTION" : u"Interprètes : Hot Chip, interprète\r\nLabel : Domino Recording Co - Domino", "TITRE" : "titre"},
         get_flac_tags(vobis_block_header(2) + encode(u"DESCRIPTION=Interprètes : Hot Chip, interprète\r\nLabel : Domino Recording Co - Domino") + encode(u"TITRE=titre")))
Example #3
0
 def test_get_flac_tags_two_comments_with_upper_and_lower_case(self):
     self.assertEquals({"TITRE" : "titre", "ALBUM" : "album"}, get_flac_tags(vobis_block_header(2) + encode('TiTrE=titre') + encode('album=album')))
Example #4
0
 def test_get_flac_tags_two_comments_with_equal_sign_in_value(self):
     self.assertEquals({"TITRE" : "e=mc2", "ALBUM" : "album"}, get_flac_tags(vobis_block_header(2) + encode('TiTrE=e=mc2') + encode('album=album')))
Example #5
0
 def test_get_flac_tags_one_comment(self):
     tags = get_flac_tags(vobis_block_header(1) + encode(b'TITRE=titre'))
     self.assertEquals({"TITRE" : "titre"}, tags)