diff --git a/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py b/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py index 50e366a..9e603f9 100644 --- a/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py +++ b/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py @@ -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", diff --git a/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py b/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py index b6428ba..f2cac09 100644 --- a/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py +++ b/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py @@ -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='',