From 368af6c72f656f4bdcc9594020cc14145ffe6234 Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Thu, 25 Aug 2016 14:43:48 +0700 Subject: [PATCH] Clean imports in code In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. http://docs.openstack.org/developer/hacking/#imports Change-Id: I22cb3fed9dc442eb90d54b876f7443522709e846 --- neutronclient/tests/unit/test_cli20_extensions.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/neutronclient/tests/unit/test_cli20_extensions.py b/neutronclient/tests/unit/test_cli20_extensions.py index 9e7d30a34..cc2913747 100644 --- a/neutronclient/tests/unit/test_cli20_extensions.py +++ b/neutronclient/tests/unit/test_cli20_extensions.py @@ -15,18 +15,16 @@ import sys -from neutronclient.neutron.v2_0.extension import ListExt -from neutronclient.neutron.v2_0.extension import ShowExt -from neutronclient.tests.unit.test_cli20 import CLITestV20Base -from neutronclient.tests.unit.test_cli20 import MyApp +from neutronclient.neutron.v2_0 import extension +from neutronclient.tests.unit import test_cli20 -class CLITestV20Extension(CLITestV20Base): +class CLITestV20Extension(test_cli20.CLITestV20Base): id_field = 'alias' def test_list_extensions(self): resources = 'extensions' - cmd = ListExt(MyApp(sys.stdout), None) + cmd = extension.ListExt(test_cli20.MyApp(sys.stdout), None) contents = [{'alias': 'ext1', 'name': 'name1', 'other': 'other1'}, {'alias': 'ext2', 'name': 'name2', 'other': 'other2'}] ret = self._test_list_resources(resources, cmd, @@ -41,7 +39,7 @@ class CLITestV20Extension(CLITestV20Base): # -F option does not work for ext-show at the moment, so -F option # is not passed in the commandline args as other tests do. resource = 'extension' - cmd = ShowExt(MyApp(sys.stdout), None) + cmd = extension.ShowExt(test_cli20.MyApp(sys.stdout), None) args = [self.test_id] ext_alias = self.test_id self._test_show_resource(resource, cmd, ext_alias, args, fields=[])