#NEWLINE# @ patch ( 'os.access' , Mock ( return_value = True ) ) #NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_should_work_with_real_data_timeout_osx( self , publish_mock ) : #NEWLINE# #INDENT# patch_communicate = patch ( 'subprocess.Popen.communicate' , Mock ( return_value = ( self . getFixture ( 'timeout_osx' ) . getvalue ( ) , '' ) ) ) #NEWLINE# patch_communicate . start ( ) #NEWLINE# self . collector . collect ( ) #NEWLINE# patch_communicate . stop ( ) #NEWLINE# self . assertPublishedMany ( publish_mock , { #NEWLINE# #INDENT# 'localhost' : 10000 , #NEWLINE# #UNINDENT# } )