From 227c429a77004baf6ca95d1b9167d1222eb1388f Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 29 Aug 2016 13:56:07 +0700 Subject: [PATCH] Clean imports in code This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I9b29ece2d04cdadc1d2e6cf51a594ab0e9a3fa74 --- mistralclient/tests/unit/v2/test_environments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mistralclient/tests/unit/v2/test_environments.py b/mistralclient/tests/unit/v2/test_environments.py index a88faa4a..f2b5e041 100644 --- a/mistralclient/tests/unit/v2/test_environments.py +++ b/mistralclient/tests/unit/v2/test_environments.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from collections import OrderedDict +import collections import copy import json @@ -61,7 +61,7 @@ class TestEnvironmentsV2(base.BaseClientV2Test): # Convert the file path to file URI uri = parse.urljoin('file:', request.pathname2url(path)) - data = OrderedDict( + data = collections.OrderedDict( utils.load_content( utils.get_contents_if_file(uri) ) @@ -97,7 +97,7 @@ class TestEnvironmentsV2(base.BaseClientV2Test): 'mistralclient', 'tests/unit/resources/env_v2.json' ) - data = OrderedDict( + data = collections.OrderedDict( utils.load_content( utils.get_contents_if_file(path) )