#NEWLINE# def test_set_vf_state_not_supported( self ) : #NEWLINE# #INDENT# with mock . patch . object ( self . pci_wrapper , '_execute' ) as mock_exec : #NEWLINE# #INDENT# mock_exec . side_effect = Exception ( pci_lib . PciDeviceIPWrapper . IP_LINK_OP_NOT_SUPPORTED ) #NEWLINE# self . assertRaises ( exc . IpCommandOperationNotSupportedError , self . pci_wrapper . set_vf_state , mock_exec . VF_INDEX , state = True )