#NEWLINE# def testWarnBulkSizeNoEffect( self ) : #NEWLINE# #INDENT# '\n        Tests warning for a set bulk size but autocommit False.\n        ' #NEWLINE# class WarnBulkSizeNoEffect ( SeriesHelper ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# series_name = 'events.stats.{server_name}' #NEWLINE# fields = [ 'time' , 'server_name' ] #NEWLINE# bulk_size = 5 #NEWLINE# tags = [ ] #NEWLINE# autocommit = False #NEWLINE# #UNINDENT# #UNINDENT# with warnings . catch_warnings ( record = True ) as w : #NEWLINE# #INDENT# warnings . simplefilter ( 'always' ) #NEWLINE# WarnBulkSizeNoEffect ( time = 159 , server_name = 'us.east-1' ) #NEWLINE# self . assertEqual ( len ( w ) , 1 , '{0} call should have generated one warning.' . format ( WarnBulkSizeNoEffect ) ) #NEWLINE# self . assertIn ( 'has no affect' , str ( w [ ( - 1 ) ] . message ) , 'Warning message did not contain "has not affect".' )