'Test write points from dataframe in batches.'

def test_write_points_from_dataframe_in_batches(self):

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