Merge "Fix use of port context in tests"

This commit is contained in:
Zuul 2019-05-16 06:23:12 +00:00 committed by Gerrit Code Review
commit 683df8fd53
2 changed files with 3 additions and 3 deletions

View File

@ -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'])

View File

@ -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,