#NEWLINE# def expect( self , method = None , uri = None , params = None ) : #NEWLINE# #INDENT# if method : #NEWLINE# #INDENT# self . assertEqual ( method , self . executor . request . method ) #NEWLINE# #UNINDENT# params = ( params or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( method in http . URLENCODE_METHODS ) : #NEWLINE# #INDENT# params . update ( { #NEWLINE# #INDENT# 'api_token' : 'my-api-token' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# uri += '?api_token=my-api-token' #NEWLINE# params = self . serialize ( params ) #NEWLINE# #UNINDENT# if uri : #NEWLINE# #INDENT# self . assertEqual ( self . executor . request . uri , ( 'https://api.pipedrive.com/v1' + uri ) ) #NEWLINE# #UNINDENT# self . assertEqual ( self . executor . request . params , params )