'Test warning for a set bulk size but autocommit False.'

def testWarnBulkSizeNoEffect(self):

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