#NEWLINE# @ mock . patch ( 'neutron.plugins.ml2.drivers.mech_sriov.agent.eswitch_manager.ESwitchManager.get_assigned_devices_info' , return_value = [ ] ) #NEWLINE# def test_report_loaded_extension( self , * args ) : #NEWLINE# #INDENT# with mock . patch . object ( agent_rpc . PluginReportStateAPI , 'report_state' ) as mock_report_state : #NEWLINE# #INDENT# agent = sriov_nic_agent . SriovNicSwitchAgent ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , 0 ) #NEWLINE# agent . _report_state ( ) #NEWLINE# mock_report_state . assert_called_with ( agent . context , agent . agent_state ) #NEWLINE# self . assertEqual ( [ 'qos' ] , agent . agent_state [ 'configurations' ] [ 'extensions' ] )