#NEWLINE# @ mock . patch ( 'os.listdir' , side_effect = OSError ( ) ) #NEWLINE# @ mock . patch ( 'neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.PciDeviceIPWrapper.is_macvtap_assigned' ) #NEWLINE# def test_is_assigned_vf_macvtap_failure( self , mock_is_macvtap_assigned , * args ) : #NEWLINE# #INDENT# esm . PciOsWrapper . is_assigned_vf ( self . DEV_NAME , self . VF_INDEX ) #NEWLINE# self . assertFalse ( mock_is_macvtap_assigned . called )