예제 #1
0
 def test_single_file(self):
     result = util.guess_info_from_path('{} - {}.FLAC'.format(
         self.TEST_TRACK_ARTIST, self.TEST_TRACK_NAME))
     self.assertEqual(result['title'], self.TEST_TRACK_NAME,
                      'Correct title')
     self.assertEqual(result['artist'], self.TEST_TRACK_ARTIST,
                      'Correct artist')
     self.assertEqual(result['source'], self.TEST_TRACK_EXTENSION.lower(),
                      'Correct source')
 def test_single_file(self):
     result = util.guess_info_from_path("{} - {}.FLAC".format(
         self.TEST_TRACK_ARTIST, self.TEST_TRACK_NAME))
     self.assertEqual(result["title"], self.TEST_TRACK_NAME,
                      "Correct title")
     self.assertEqual(result["artist"], self.TEST_TRACK_ARTIST,
                      "Correct artist")
     self.assertEqual(result["source"], self.TEST_TRACK_EXTENSION.lower(),
                      "Correct source")
예제 #3
0
 def test_dir_artist_hyphen_album(self):
     result = util.guess_info_from_path('{} - {}/{} - {}.FLAC'.format(
         self.TEST_TRACK_ARTIST, self.TEST_TRACK_ALBUM,
         self.TEST_TRACK_NUMBER, self.TEST_TRACK_NAME))
     self.assertEqual(result['title'], self.TEST_TRACK_NAME,
                      'Correct title')
     self.assertEqual(result['artist'], self.TEST_TRACK_ARTIST,
                      'Correct artist')
     self.assertEqual(result['source'], self.TEST_TRACK_EXTENSION.lower(),
                      'Correct source')
     self.assertEqual(result['album'], self.TEST_TRACK_ALBUM,
                      'Correct album')
     self.assertEqual(result['track_number'], self.TEST_TRACK_NUMBER,
                      'Correct track number')
 def test_dir_artist_hyphen_album(self):
     result = util.guess_info_from_path("{} - {}/{} - {}.FLAC".format(
         self.TEST_TRACK_ARTIST,
         self.TEST_TRACK_ALBUM,
         self.TEST_TRACK_NUMBER,
         self.TEST_TRACK_NAME,
     ))
     self.assertEqual(result["title"], self.TEST_TRACK_NAME,
                      "Correct title")
     self.assertEqual(result["artist"], self.TEST_TRACK_ARTIST,
                      "Correct artist")
     self.assertEqual(result["source"], self.TEST_TRACK_EXTENSION.lower(),
                      "Correct source")
     self.assertEqual(result["album"], self.TEST_TRACK_ALBUM,
                      "Correct album")
     self.assertEqual(result["track_number"], self.TEST_TRACK_NUMBER,
                      "Correct track number")