Fix use of port context in tests
After finding the mis-use of self.port() in the revision tests, searched and found some other cases where the subnet was not being passed. Fixed even though these probably won't ever cause a test failure. Trivialfix Change-Id: I05402cfdbfd5c7941c5f442542eb0dd5a005e3fe
This commit is contained in:
parent
17fa84613e
commit
a36adfdb8b
|
@ -974,7 +974,7 @@ class TestPortsV2(NeutronDbPluginV2TestCase):
|
|||
keys = [('admin_state_up', True), ('status', self.port_create_status)]
|
||||
with self.network(shared=True) as network:
|
||||
with self.subnet(network=network) as subnet:
|
||||
with self.port(name='myname') as port:
|
||||
with self.port(name='myname', subnet=subnet) as port:
|
||||
for k, v in keys:
|
||||
self.assertEqual(port['port'][k], v)
|
||||
self.assertIn('mac_address', port['port'])
|
||||
|
|
|
@ -2132,8 +2132,8 @@ class L3NatTestCaseBase(L3NatTestCaseMixin):
|
|||
|
||||
def test_router_remove_interface_wrong_port_returns_404(self):
|
||||
with self.router() as r:
|
||||
with self.subnet():
|
||||
with self.port() as p:
|
||||
with self.subnet() as s:
|
||||
with self.port(subnet=s) as p:
|
||||
self._router_interface_action('add',
|
||||
r['router']['id'],
|
||||
None,
|
||||
|
|
Loading…
Reference in New Issue