def test_delete_music(self): title = 'music_title' artist = 'music_artist' album = 'music_album' company = 'music_company' public_time = '2013' kbps = '64' uuid = 'douban-uuid' music = add_music(title, artist, album, company, public_time, kbps, self.cover, self.audio, uuid) assert len(get_music()) == 1 music = get_music()[0] delete_music(music) assert len(get_music()) == 0
def delete(self, key): music = get_music(key=key)[0] delete_music(music)