'Test warning for an invalid bulk size.'

@unittest.skip(u'Fails    on    py32')
def testWarnBulkSizeZero(self):

    class WarnBulkSizeZero(SeriesHelper, ):
        class Meta:
            client = TestSeriesHelper.client
            series_name = u'events.stats.{server_name}'
            fields = [u'time', u'server_name']
            tags = []
            bulk_size = 0
            autocommit = True
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter(u'always')
        try:
            WarnBulkSizeZero(time=159, server_name=u'us.east-1')
        except ConnectionError:
            pass
        self.assertEqual(len(w), 1, u'{0}    call    should    have    generated    one    warning.'.format(WarnBulkSizeZero))
        self.assertIn(u'forced    to    1', str(w[(-1)].message), u'Warning    message    did    not    contain    "forced    to    1".')
