#NEWLINE# def test_album_total( self , lib_mock ) : #NEWLINE# #INDENT# lib_mock . sp_search_error . return_value = spotify . ErrorType . OK #NEWLINE# lib_mock . sp_search_total_albums . return_value = 75 #NEWLINE# sp_search = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# search = spotify . Search ( self . session , sp_search = sp_search ) #NEWLINE# result = search . album_total #NEWLINE# lib_mock . sp_search_total_albums . assert_called_with ( sp_search ) #NEWLINE# self . assertEqual ( result , 75 )