#NEWLINE# @ patch ( '__builtin__.open' ) #NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_should_open_all_cpuacct_stat( self , publish_mock , open_mock ) : #NEWLINE# #INDENT# return #NEWLINE# self . collector . config [ 'path' ] = self . getFixtureDirPath ( ) #NEWLINE# open_mock . side_effect = ( lambda x : StringIO ( '' ) ) #NEWLINE# self . collector . collect ( ) #NEWLINE# paths = [ 'lxc/testcontainer/cpuacct.stat' , 'lxc/cpuacct.stat' , 'cpuacct.stat' ] #NEWLINE# for path in paths : #NEWLINE# #INDENT# open_mock . assert_any_call ( os . path . join ( self . getFixtureDirPath ( ) , publish_mock ) )