#NEWLINE# def test_nginx_tags( self ) : #NEWLINE# #INDENT# nginx = load_check ( 'nginx' , self . config , self . agent_config ) #NEWLINE# nginx . check ( self . config [ 'instances' ] [ 1 ] ) #NEWLINE# r = nginx . get_metrics ( ) #NEWLINE# self . assertEquals ( r [ 0 ] [ 3 ] . get ( 'tags' ) , [ 'first_one' ] ) #NEWLINE# service_checks = nginx . get_service_checks ( ) #NEWLINE# can_connect = [ sc for sc in service_checks if ( sc [ 'check' ] == 'nginx.can_connect' ) ] #NEWLINE# for i in range ( len ( can_connect ) ) : #NEWLINE# #INDENT# self . assertEquals ( set ( can_connect [ i ] [ 'tags' ] ) , set ( [ 'host:localhost' , 'port:44441' ] ) , service_checks )