Esempio n. 1
0
 def testGetLyricsXML(self):
     '''testGetLyricsXML - Ensures the lyrics are fetched correctly'''
     lyrics = LyricsDownloader('On A Plain', 'Nirvana', False)
     lyrics._clean_up_artist_title()
     test_xml = urllib.urlopen(THIS_DIR +
                               '/data/LyricsDownloader/lyrics_xml').read()
     self.assertEqual(lyrics._get_lyrics_xml(), test_xml)
 def testGetLyricsXML(self):
     '''testGetLyricsXML - Ensures the lyrics are fetched correctly'''
     lyrics = LyricsDownloader('On A Plain', 'Nirvana', False)
     lyrics._clean_up_artist_title()
     test_xml = urllib.urlopen(THIS_DIR +
         '/data/LyricsDownloader/lyrics_xml').read()
     self.assertEqual(lyrics._get_lyrics_xml(), test_xml)
Esempio n. 3
0
 def testCleanUpArtistTitle(self):
     '''testCleanUpArtistTitle - Ensures the artist is converted for use in
     the url'''
     callback = False
     lyrics = LyricsDownloader('Foo', "Test 123 ()$^*=:;|#@}{][!,.-_\\&'",
                               callback)
     lyrics._clean_up_artist_title()
     self.assertEqual(lyrics.artist,
                      'test%20123%20()$^*=:;|#@}{][!,.-_\\%%')
 def testCleanUpArtistTitle(self):
     '''testCleanUpArtistTitle - Ensures the artist is converted for use in
     the url'''
     callback = False
     lyrics = LyricsDownloader('Foo', "Test 123 ()$^*=:;|#@}{][!,.-_\\&'" ,
         callback)
     lyrics._clean_up_artist_title()
     self.assertEqual(lyrics.artist,
         'test%20123%20()$^*=:;|#@}{][!,.-_\\%%')