#NEWLINE# def test_did_you_mean( self , lib_mock ) : #NEWLINE# #INDENT# lib_mock . sp_search_error . return_value = spotify . ErrorType . OK #NEWLINE# lib_mock . sp_search_did_you_mean . return_value = spotify . ffi . new ( 'char[]' , b'Foo Bar Baz' ) #NEWLINE# sp_search = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# search = spotify . Search ( self . session , sp_search = sp_search ) #NEWLINE# result = search . did_you_mean #NEWLINE# lib_mock . sp_search_did_you_mean . assert_called_once_with ( sp_search ) #NEWLINE# self . assertEqual ( search , 'Foo Bar Baz' )