#NEWLINE# @ patch ( 'ncclient.transport.SSHSession' ) #NEWLINE# @ patch ( 'ncclient.operations.RPC._request' ) #NEWLINE# def test_unlock_default_param( self , mock_request , mock_session ) : #NEWLINE# #INDENT# session = ncclient . transport . SSHSession ( self . device_handler ) #NEWLINE# obj = Unlock ( session , self . device_handler , raise_mode = RaiseMode . ALL ) #NEWLINE# obj . request ( ) #NEWLINE# node = new_ele ( 'unlock' ) #NEWLINE# sub_ele ( sub_ele ( node , 'target' ) , 'candidate' ) #NEWLINE# xml = ElementTree . tostring ( node , method = 'xml' ) #NEWLINE# call = mock_request . call_args_list [ 0 ] [ 0 ] [ 0 ] #NEWLINE# call = ElementTree . tostring ( call , method = 'xml' ) #NEWLINE# self . assertEqual ( call , xml )