Merge "tests: generate unique network ids for L3HARouterVRIdAllocation"

This commit is contained in:
Jenkins 2017-09-18 04:36:46 +00:00 committed by Gerrit Code Review
commit 7b45f35018
2 changed files with 4 additions and 2 deletions

View File

@ -601,6 +601,8 @@ class _BaseObjectTestCase(object):
Note: if a value is a dict itself, the method will recursively update
corresponding embedded objects.
'''
# TODO(ihrachys) make the method update db_objs to keep generated test
# objects unique despite new locked fields
for k, v in values_dict.items():
for db_obj, fields, obj in zip(
db_objs or self.db_objs,

View File

@ -70,5 +70,5 @@ class L3HARouterVRIdAllocationDbObjectTestCase(base.BaseDbObjectTestCase,
def setUp(self):
super(L3HARouterVRIdAllocationDbObjectTestCase, self).setUp()
network = self._create_test_network()
self.update_obj_fields({'network_id': network.id})
self.update_obj_fields(
{'network_id': lambda: self._create_test_network().id})