#NEWLINE# def test_create_eswitch_mgr_ok( self ) : #NEWLINE# #INDENT# device_mappings = { #NEWLINE# #INDENT# 'physnet1' : [ 'p6p1' ] , #NEWLINE# #UNINDENT# } #NEWLINE# with mock . patch ( 'neutron.plugins.ml2.drivers.mech_sriov.agent.eswitch_manager.PciOsWrapper.scan_vf_devices' , return_value = device_mappings . SCANNED_DEVICES ) , mock . patch ( 'neutron.plugins.ml2.drivers.mech_sriov.agent.eswitch_manager.PciOsWrapper.is_assigned_vf' , return_value = True ) : #NEWLINE# #INDENT# esm . ESwitchManager ( ) . discover_devices ( device_mappings , None )