'Test write points in batch from df in TestDataFrameClient object.'

def test_write_points_from_dataframe_in_batches(self):

    now = pd.Timestamp(u'1970-01-01    00:00+00:00')
    dataframe = pd.DataFrame(data=[[u'1', 1, 1.0], [u'2', 2, 2.0]], index=[now, (now + timedelta(hours=1))], columns=[u'column_one', u'column_two', u'column_three'])
    with requests_mock.Mocker() as m:
        m.register_uri(requests_mock.POST, u'http://localhost:8086/write', status_code=204)
        cli = DataFrameClient(database=u'db')
        self.assertTrue(cli.write_points(dataframe, u'foo', batch_size=1))
