'Test update alloc pool to something outside subnet.cidr.
This makes sure that an erroneous allocation_pool specified
in a subnet update (outside subnet cidr) will result in an error.'

def test_update_subnet_allocation_pools_invalid_pool_for_cidr(self):

    allocation_pools = [{'start': '192.168.0.2', 'end': '192.168.0.254'}]
    with self.network() as network:
        with self.subnet(network=network, allocation_pools=allocation_pools, cidr='192.168.0.0/24') as subnet:
            data = {'subnet': {'allocation_pools': [{'start': '10.0.0.10', 'end': '10.0.0.20'}]}}
            req = self.new_update_request('subnets', data, subnet['subnet']['id'])
            res = req.get_response(self.api)
            self.assertEqual(webob.exc.HTTPClientError.code, res.status_int)
