#NEWLINE# @ patch . object ( GridEngineCollector , '_queue_stats_xml' ) #NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_queue_stats_should_work_with_real_data( self , publish_mock , xml_mock ) : #NEWLINE# #INDENT# 'Test that fixtures are parsed correctly\n        ' #NEWLINE# xml_mock . return_value = self . getFixture ( 'queue_stats.xml' ) . getvalue ( ) #NEWLINE# self . collector . _collect_queue_stats ( ) #NEWLINE# published_metrics = { #NEWLINE# #INDENT# 'queues.hadoop.load' : 0.00532 , #NEWLINE# 'queues.hadoop.used' : 0 , #NEWLINE# 'queues.hadoop.resv' : 0 , #NEWLINE# 'queues.hadoop.available' : 0 , #NEWLINE# 'queues.hadoop.total' : 36 , #NEWLINE# 'queues.hadoop.temp_disabled' : 0 , #NEWLINE# 'queues.hadoop.manual_intervention' : 36 , #NEWLINE# 'queues.primary_q.load' : 0.20509 , #NEWLINE# 'queues.primary_q.used' : 1024 , #NEWLINE# 'queues.primary_q.resv' : 0 , #NEWLINE# 'queues.primary_q.available' : 1152 , #NEWLINE# 'queues.primary_q.total' : 2176 , #NEWLINE# 'queues.primary_q.temp_disabled' : 0 , #NEWLINE# 'queues.primary_q.manual_intervention' : 0 , #NEWLINE# 'queues.secondary_q.load' : 0.0046 , #NEWLINE# 'queues.secondary_q.used' : 145 , #NEWLINE# 'queues.secondary_q.resv' : 0 , #NEWLINE# 'queues.secondary_q.available' : 1007 , #NEWLINE# 'queues.secondary_q.total' : 1121 , #NEWLINE# 'queues.secondary_q.temp_disabled' : 1 , #NEWLINE# 'queues.secondary_q.manual_intervention' : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertPublishedMany ( published_metrics , published_metrics )