def genres(self):
     return [song.genre for song in Song.all() if song.artist == self]
 def test_song_class_method(self):
     self.assertItemsEqual(Song._all,
                           [song_1, song_2, song_3, song_4, song_5])
     self.assertItemsEqual(Song.all(),
                           [song_1, song_2, song_3, song_4, song_5])
 def songs(self):
     return [song for song in Song.all() if song.genre == self]
 def songs(self):
     return [song for song in Song.all() if song.artist == self]
 def artists(self):
     return [song.artist for song in Song.all() if song.genre == self]
Esempio n. 6
0
 def artists(self):
     return [music.artist for music in Song.all() if music.genre == self]
Esempio n. 7
0
 def songs(self):
     return [music for music in Song.all() if music.genre == self]
 def genres(self):
     return [music.genre for music in Song.all() if  music.artist == self]
 def songs(self):
     return [music for music in Song.all() if  music.artist == self]