# coding: utf-8
import os
import sys
module_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'modules')
sys.path.append(module_dir)

import unittest
from kget import KGet as Lyric

class KGetTest(unittest.TestCase):
    def test_url_zutto(self):
        url = 'http://www.kget.jp/lyric/188989/'
        obj = Lyric(url)
        obj.parse()

        self.assertEqual(obj.title, u'ずっと feat.HAN-KUN & TEE')
        self.assertEqual(obj.artist, u'SPICY CHOCOLATE, HAN-KUN, TEE')
        self.assertEqual(obj.lyricist, u'HAN-KUN, TEE')
        self.assertEqual(obj.composer, u'DJ CONTROLER, U.M.E.D.Y., WolfJunk')
        self.assertEqual(len(obj.lyric), 769)

    def test_url_kanjani8(self):
        url = 'http://www.kget.jp/lyric/185146/'
        obj = Lyric(url)
        obj.parse()

        self.assertEqual(obj.title, u'ビースト!!')
        self.assertEqual(obj.artist, u'関ジャニ∞')
        self.assertEqual(obj.lyricist, u'錦戸亮')
        self.assertEqual(obj.composer, u'朱鷺羽ソウ')
        self.assertEqual(len(obj.lyric), 924)

if __name__ == '__main__':
    unittest.main()

@@ -1035,16 +1035,387 @@
 , 924)%0A%0A
+    def test_url_maaya(self):%0A        url = 'http://www.kget.jp/lyric/11066/'%0A        obj = Lyric(url)%0A        obj.parse()%0A%0A        self.assertEqual(obj.title, u'tune the rainbow')%0A        self.assertEqual(obj.artist, u'%E5%9D%82%E6%9C%AC%E7%9C%9F%E7%B6%BE')%0A        self.assertEqual(obj.lyricist, u'%E5%B2%A9%E9%87%8C%E7%A5%90%E7%A9%82')%0A        self.assertEqual(obj.composer, u'%E8%8F%85%E9%87%8E%E3%82%88%E3%81%86%E5%AD%90')%0A        self.assertEqual(len(obj.lyric), 520)%0A%0A
 if __nam

add test case for kget