#NEWLINE# @ patch ( 'carbon.aggregator.buffers.LoopingCall' , spec = LoopingCall ) #NEWLINE# def test_configure_buffer_uses_writeback_freq_if_less_than_freq( self , looping_call_mock ) : #NEWLINE# #INDENT# settings = TestSettings ( ) #NEWLINE# settings [ 'WRITE_BACK_FREQUENCY' ] = 30 #NEWLINE# with patch ( 'carbon.aggregator.buffers.settings' , new = settings ) : #NEWLINE# #INDENT# self . new_metric_buffer . configure_aggregation ( 60 , sum ) #NEWLINE# looping_call_mock . return_value . start . assert_called_once_with ( 30 , now = False )