#NEWLINE# @ mock . patch ( 'storyboardclient.base.BaseHTTPClient.request' ) #NEWLINE# def test_authorized_client_request( self , mock_request ) : #NEWLINE# #INDENT# auth_plugin = oauth . OAuthPlugin ( api_url = 'http://some_endpoint' , access_token = 'some_token' ) #NEWLINE# client = base . BaseHTTPClient ( auth_plugin = auth_plugin ) #NEWLINE# client . client_request ( client = mock . MagicMock ( ) , method = 'GET' , url = '/some_url' ) #NEWLINE# mock_request . assert_called_once_with ( 'GET' , 'http://some_endpoint/some_url' , headers = { #NEWLINE# #INDENT# 'Authorization' : 'Bearer some_token' , #NEWLINE# #UNINDENT# } )