#NEWLINE# @ mock . patch . object ( utils , 'ssh_connect' , autospec = True ) #NEWLINE# def test__get_connection_client( self , ssh_connect_mock ) : #NEWLINE# #INDENT# ssh_connect_mock . return_value = self . sshclient #NEWLINE# client = ssh . _get_connection ( self . node ) #NEWLINE# self . assertEqual ( self . sshclient , client ) #NEWLINE# driver_info = ssh . _parse_driver_info ( self . node ) #NEWLINE# ssh_connect_mock . assert_called_once_with ( driver_info )