'Test invalid alter retention policy.'

def test_alter_retention_policy_invalid(self):

    self.cli.create_retention_policy(u'somename', u'1d', 1)
    with self.assertRaises(InfluxDBClientError) as ctx:
        self.cli.alter_retention_policy(u'somename', u'db')
    self.assertEqual(400, ctx.exception.code)
    self.assertIn(u'{"error":"error    parsing    query:    ', ctx.exception.content)
    rsp = self.cli.get_list_retention_policies()
    self.assertEqual([{u'duration': u'0s', u'default': True, u'replicaN': 1, u'shardGroupDuration': u'168h0m0s', u'name': u'autogen'}, {u'duration': u'24h0m0s', u'default': False, u'replicaN': 1, u'shardGroupDuration': u'1h0m0s', u'name': u'somename'}], rsp)
