Address FutureWarning for invalid UUIDs

Ensure that the following warning does not appear in the tests:

    FutureWarning: test-tenant is an invalid UUID. Using
    UUIDFields with invalid UUIDs is no longer supported,
    and will be removed in a future release. Please update
    your code to input valid UUIDs or accept ValueErrors
    for invalid UUIDs. See http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField
    for further details

TrivialFix

Change-Id: Ie34627380526734e3d6895859e7805f3023ddc78
This commit is contained in:
Gary Kotton 2016-06-16 11:34:22 -07:00
parent c68577c946
commit 18590cba18
1 changed files with 3 additions and 3 deletions

View File

@ -573,7 +573,7 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
def test__tenant_prefixes_by_router_no_gateway_port(self):
with self.network() as net1, self.network() as net2,\
self.subnetpool_with_address_scope(6, tenant_id='test-tenant',
self.subnetpool_with_address_scope(6, tenant_id=_uuid(),
prefixes=['2001:db8::/63']) as pool:
subnetpool_id = pool['id']
with self.subnet(network=net1,
@ -643,9 +643,9 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
def test_all_routes_by_bgp_speaker_different_tenant_address_scope(self):
binding_cidr = '2001:db8::/64'
tenant_cidr = '2002:ab8::/64'
with self.subnetpool_with_address_scope(6, tenant_id='test-tenant',
with self.subnetpool_with_address_scope(6, tenant_id=_uuid(),
prefixes=[binding_cidr]) as ext_pool,\
self.subnetpool_with_address_scope(6, tenant_id='test-tenant',
self.subnetpool_with_address_scope(6, tenant_id=_uuid(),
prefixes=[tenant_cidr]) as int_pool,\
self.network() as ext_net, self.network() as int_net:
gw_net_id = ext_net['network']['id']