Update neutron cli unit tests

After the recent python-neutronclient change. [1]

[1] I3950ed8cf50508210c8b3270724e283aea8e1673

Closed-Bug: #1706573
Change-Id: I8bf78427812895000a85466fb15f0ca65331dff6
This commit is contained in:
YAMAMOTO Takashi 2017-07-26 19:58:07 +09:00
parent 7fa6d23311
commit 93868fc6b5
2 changed files with 8 additions and 4 deletions

View File

@ -43,12 +43,14 @@ class CLITestV20TapFlowJSON(test_cli20.CLITestV20Base):
return contrib
def test_ext_cmd_loaded(self):
shell.NeutronShell('2.0')
neutron_shell = shell.NeutronShell('2.0')
extension_cmd = {'tap-flow-create': tapflow.CreateTapFlow,
'tap-flow-delete': tapflow.DeleteTapFlow,
'tap-flow-show': tapflow.ShowTapFlow,
'tap-flow-list': tapflow.ListTapFlow}
self.assertDictContainsSubset(extension_cmd, shell.COMMANDS['2.0'])
for cmd_name, cmd_class in extension_cmd.items():
found = neutron_shell.command_manager.find_command([cmd_name])
self.assertEqual(cmd_class, found[0])
def _test_create_tap_flow(self, port_id="random_port",
service_id="random_service",

View File

@ -43,12 +43,14 @@ class CLITestV20TapServiceJSON(test_cli20.CLITestV20Base):
return contrib
def test_ext_cmd_loaded(self):
shell.NeutronShell('2.0')
neutron_shell = shell.NeutronShell('2.0')
extension_cmd = {'tap-service-create': tapservice.CreateTapService,
'tap-service-delete': tapservice.DeleteTapService,
'tap-service-show': tapservice.ShowTapService,
'tap-service-list': tapservice.ListTapService}
self.assertDictContainsSubset(extension_cmd, shell.COMMANDS['2.0'])
for cmd_name, cmd_class in extension_cmd.items():
found = neutron_shell.command_manager.find_command([cmd_name])
self.assertEqual(cmd_class, found[0])
def _test_create_tap_service(self, port_id="random_port",
name='',