'Test write points attrs for TestInfluxDBClient object.'

def test_write_points_toplevel_attributes(self):

    with requests_mock.Mocker() as m:
        m.register_uri(requests_mock.POST, u'http://localhost:8086/write', status_code=204)
        cli = InfluxDBClient(database=u'db')
        cli.write_points(self.dummy_points, database=u'testdb', tags={u'tag': u'hello'}, retention_policy=u'somepolicy')
        self.assertEqual(u'cpu_load_short,host=server01,region=us-west,tag=hello    value=0.64    1257894000123456000\n', m.last_request.body.decode(u'utf-8'))
