#NEWLINE# def test_more( self , lib_mock ) : #NEWLINE# #INDENT# sp_search1 = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# sp_search2 = spotify . ffi . cast ( 'sp_search *' , 43 ) #NEWLINE# lib_mock . sp_search_create . side_effect = [ sp_search1 , sp_search2 ] #NEWLINE# lib_mock . sp_search_error . return_value = spotify . ErrorType . OK #NEWLINE# lib_mock . sp_search_query . return_value = spotify . ffi . new ( 'char[]' , b'alice' ) #NEWLINE# result = spotify . Search ( self . session , query = 'alice' ) #NEWLINE# lib_mock . sp_search_create . assert_called_with ( sp_search2 . session . _sp_session , mock . ANY , 0 , 20 , 0 , 20 , 0 , 20 , 0 , 20 , int ( spotify . SearchType . STANDARD ) , mock . ANY , mock . ANY ) #NEWLINE# self . assertEqual ( spotify . ffi . string ( lib_mock . sp_search_create . call_args [ 0 ] [ 1 ] ) , b'alice' ) #NEWLINE# self . assertEqual ( lib_mock . sp_search_add_ref . call_count , 0 ) #NEWLINE# self . assertIsInstance ( result , spotify . Search ) #NEWLINE# self . assertEqual ( result . _sp_search , sp_search1 ) #NEWLINE# result = result . more ( track_count = 30 , album_count = 30 , artist_count = 30 , playlist_count = 30 ) #NEWLINE# lib_mock . sp_search_create . assert_called_with ( self . session . _sp_session , mock . ANY , 20 , 30 , 20 , 30 , 20 , 30 , 20 , 30 , int ( spotify . SearchType . STANDARD ) , mock . ANY , mock . ANY ) #NEWLINE# self . assertEqual ( spotify . ffi . string ( lib_mock . sp_search_create . call_args [ 0 ] [ 1 ] ) , b'alice' ) #NEWLINE# self . assertEqual ( lib_mock . sp_search_add_ref . call_count , 0 ) #NEWLINE# self . assertIsInstance ( result , spotify . Search ) #NEWLINE# self . assertEqual ( result . _sp_search , sp_search2 )