'Test IPv6 SLAAC subnet delete with a router port using the subnet'

def test_delete_subnet_ipv6_slaac_router_port_exists(self):

    (subnet, port) = self._create_slaac_subnet_and_port(constants.DEVICE_OWNER_ROUTER_INTF)
    req = self.new_delete_request('subnets', subnet['subnet']['id'])
    res = req.get_response(self.api)
    self.assertEqual(webob.exc.HTTPConflict.code, res.status_int)
    req = self.new_show_request('subnets', subnet['subnet']['id'], self.fmt)
    res = req.get_response(self.api)
    ssubnet = self.deserialize(self.fmt, req.get_response(self.api))
    self.assertIsNotNone(ssubnet)
    req = self.new_show_request('ports', port['port']['id'], self.fmt)
    res = req.get_response(self.api)
    sport = self.deserialize(self.fmt, req.get_response(self.api))
    self.assertEqual(1, len(sport['port']['fixed_ips']))
    port_subnet_ids = [fip['subnet_id'] for fip in sport['port']['fixed_ips']]
    self.assertIn(subnet['subnet']['id'], port_subnet_ids)
