Added lyricsFound key to get_lyrics result & updated tests

This commit is contained in:
alexmercerind 2020-12-04 21:20:22 +05:30
commit eec1ff1d29
2 changed files with 7 additions and 0 deletions

View file

@ -94,11 +94,13 @@ class TestYTMusic(unittest.TestCase):
def test_get_lyrics(self):
lyrics_song = youtube.get_lyrics("ZrOKjDZOtkA")
self.assertTrue(lyrics_song["lyricsFound"])
self.assertIsNotNone(lyrics_song["browseId"])
self.assertIsNotNone(lyrics_song["lyrics"])
self.assertIsNotNone(lyrics_song["source"])
no_lyrics_song = youtube.get_lyrics("9TnpB8WgW4s")
self.assertFalse(lyrics_song["lyricsFound"])
self.assertIsNotNone(no_lyrics_song["browseId"])
self.assertIsNotNone(no_lyrics_song["lyrics"])
self.assertIsNotNone(no_lyrics_song["source"])