#NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_should_work_with_real_data( self , publish_mock ) : #NEWLINE# #INDENT# published_metrics = { #NEWLINE# #INDENT# '_mnt_path1.events.inoderevalidates' : 27110.0 , #NEWLINE# '_mnt_path1.events.delay' : 0.0 , #NEWLINE# '_mnt_path1.bytes.normalreadbytes' : 1424269.0 , #NEWLINE# '_mnt_path1.bytes.serverwritebytes' : 69460.0 , #NEWLINE# '_mnt_path1.xprt.tcp.port' : 0.0 , #NEWLINE# '_mnt_path1.xprt.tcp.backlogutil' : 11896527.0 , #NEWLINE# '_mnt_path1.rpc.access.ops' : 2988.0 , #NEWLINE# '_mnt_path1.rpc.write.ops' : 16.0 , #NEWLINE# #UNINDENT# } #NEWLINE# unpublished_metrics = { #NEWLINE# #INDENT# '_mnt_path2.events.delay' : 0.0 , #NEWLINE# #UNINDENT# } #NEWLINE# self . collector . MOUNTSTATS = self . getFixturePath ( 'mountstats_1' ) #NEWLINE# self . collector . collect ( ) #NEWLINE# self . assertPublishedMany ( publish_mock , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . collector . MOUNTSTATS = self . getFixturePath ( 'mountstats_2' ) #NEWLINE# self . collector . collect ( ) #NEWLINE# self . assertPublishedMany ( publish_mock , published_metrics ) #NEWLINE# self . assertUnpublishedMany ( publish_mock , unpublished_metrics )