#NEWLINE# def test_report_state( self ) : #NEWLINE# #INDENT# with mock . patch ( 'neutron.agent.rpc.PluginReportStateAPI' ) as state_api : #NEWLINE# #INDENT# with mock . patch ( 'os.makedirs' ) : #NEWLINE# #INDENT# proxy = agent . UnixDomainMetadataProxy ( mock . Mock ( ) ) #NEWLINE# self . assertTrue ( proxy . agent_state [ 'start_flag' ] ) #NEWLINE# proxy . _report_state ( ) #NEWLINE# self . assertNotIn ( 'start_flag' , proxy . agent_state ) #NEWLINE# state_api_inst = state_api . return_value #NEWLINE# state_api_inst . report_state . assert_called_once_with ( proxy . context , proxy . agent_state , use_call = True )