def test_get_songs(self): ''' Test case to check if all songs are returned by the get_songs function ''' self.new_song.save_song() test_song = Song(name="Wierd Song Awkward Song") test_song.save_song() gotten_songs = Song.get_songs(3456789098765431234567890098765432123456787654323456787654323456787654323456787654334) self.assertTrue( len(gotten_songs) != len(Song.query.all()) )
def test_delete_song(self): ''' Test case to check if test_song is deleted from the database ''' self.new_song.save_song() test_song = Song(name="Stand Up Jump Up") test_song.save_song() test_song.delete_song(test_song.id) gotten_songs = Song.get_songs(4990826417581240726341234) self.assertFalse(len(gotten_songs) == len(Song.query.all()))