#NEWLINE# @ mock . patch ( 'spotify.Link' , spec = spotify . Link ) #NEWLINE# def test_repr( self , link_mock , lib_mock ) : #NEWLINE# #INDENT# link_instance_mock = link_mock . return_value #NEWLINE# link_instance_mock . uri = 'foo' #NEWLINE# sp_search = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# search = spotify . Search ( self . session , sp_search = sp_search ) #NEWLINE# result = repr ( search ) #NEWLINE# self . assertEqual ( result , ( 'Search(%r)' % 'foo' ) )