Skip to content

Commit ad778a6

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix ipam_pluggable_backend unit tests module" into stable/yoga
2 parents d890ad3 + 4c842e8 commit ad778a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

neutron/tests/unit/db/test_ipam_pluggable_backend.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ class TestIpamSubnetPool(UseIpamMixin, test_db_base.TestSubnetPoolsV2):
6363

6464

6565
class TestDbBasePluginIpam(test_db_base.NeutronDbPluginV2TestCase):
66-
def setUp(self):
66+
def setUp(self, plugin=None):
67+
if not plugin:
68+
plugin = 'neutron.tests.unit.db.test_ipam_backend_mixin.TestPlugin'
69+
super(TestDbBasePluginIpam, self).setUp(plugin=plugin)
6770
cfg.CONF.set_override("ipam_driver", 'internal')
68-
super(TestDbBasePluginIpam, self).setUp()
6971
self.tenant_id = uuidutils.generate_uuid()
7072
self.subnet_id = uuidutils.generate_uuid()
7173
self.admin_context = ncontext.get_admin_context()
@@ -413,7 +415,7 @@ def test_create_ipv6_pd_subnet_over_ipam(self, pool_mock):
413415
subnetpool_id=constants.IPV6_PD_POOL_ID,
414416
ipv6_ra_mode=constants.IPV6_SLAAC,
415417
ipv6_address_mode=constants.IPV6_SLAAC):
416-
self.assertEqual(2, pool_mock.get_instance.call_count)
418+
self.assertEqual(3, pool_mock.get_instance.call_count)
417419
self.assertTrue(mocks['driver'].allocate_subnet.called)
418420
request = mocks['driver'].allocate_subnet.call_args[0][0]
419421
self.assertIsInstance(request, ipam_req.SpecificSubnetRequest)

0 commit comments

Comments
 (0)