def test_url_id(self): url = 'http://joysound.com/ex/search/karaoke/_selSongNo_170492_songwords.htm' obj = Lyric(url) obj.parse() self.assertEqual(obj.title, u'I.D.') self.assertEqual(obj.artist, u'坂本真綾') self.assertEqual(obj.lyricist, u'坂本真綾') self.assertEqual(obj.composer, u'菅野よう子') self.assertEqual(len(obj.lyric), 416)
def test_url_saved(self): url = 'http://joysound.com/ex/search/karaoke/_selSongNo_735411_songwords.htm' obj = Lyric(url) obj.parse() self.assertEqual(obj.title, u'SAVED.') self.assertEqual(obj.artist, u'坂本真綾') self.assertEqual(obj.lyricist, u'鈴木祥子') self.assertEqual(obj.composer, u'鈴木祥子') self.assertEqual(len(obj.lyric), 421)