#NEWLINE# def test_main( self ) : #NEWLINE# #INDENT# with mock . patch . object ( agent , 'UnixDomainMetadataProxy' ) as proxy : #NEWLINE# #INDENT# with mock . patch . object ( metadata_agent , 'config' ) as config : #NEWLINE# #INDENT# with mock . patch . object ( metadata_agent , 'cfg' ) as cfg : #NEWLINE# #INDENT# with mock . patch . object ( utils , 'cfg' ) : #NEWLINE# #INDENT# metadata_agent . main ( ) #NEWLINE# self . assertTrue ( proxy . setup_logging . called ) #NEWLINE# proxy . assert_has_calls ( [ mock . call ( cfg . CONF ) , mock . call ( ) . run ( ) ] )