#NEWLINE# def test_update_port_postcommit_normal( self ) : #NEWLINE# #INDENT# 'Verifies UCS Manager driver is called with correct parameters.' #NEWLINE# name = PORT_NAME #NEWLINE# port_id = PORT_ID #NEWLINE# vnic_type = VNIC_NORMAL #NEWLINE# profile = { #NEWLINE# #INDENT# 'pci_vendor_info' : const . PCI_INFO_CISCO_VIC_1240 , #NEWLINE# #UNINDENT# } #NEWLINE# network_context = self . _create_network_context ( ) #NEWLINE# port_context = FakePortContext ( name , port_id , vnic_type , profile , network_context ) #NEWLINE# self . mech_driver . bind_port ( self ) #NEWLINE# self . mech_driver . update_port_precommit ( port_context ) #NEWLINE# def new_update_serviceprofile( mech_context , host_id , vlan_id ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# mock . patch . object ( ucsm_network_driver . CiscoUcsmDriver , 'update_serviceprofile' , new = new_update_serviceprofile ) . start ( ) #NEWLINE# self . mech_driver . update_port_postcommit ( port_context )