#NEWLINE# def test_playlists_if_no_playlists( self , lib_mock ) : #NEWLINE# #INDENT# lib_mock . sp_search_error . return_value = spotify . ErrorType . OK #NEWLINE# lib_mock . sp_search_num_playlists . return_value = 0 #NEWLINE# sp_search = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# search = spotify . Search ( self . session , sp_search = result ) #NEWLINE# result = search . playlists #NEWLINE# self . assertEqual ( len ( result ) , 0 ) #NEWLINE# lib_mock . sp_search_num_playlists . assert_called_with ( sp_search ) #NEWLINE# self . assertEqual ( lib_mock . sp_search_playlist . call_count , 0 )