From 1f4a75f2682dfa02fe22848c97ea3f78c103b4f2 Mon Sep 17 00:00:00 2001 From: rallytime Date: Thu, 7 Jul 2016 19:27:30 -0600 Subject: [PATCH] Move StringIO import to use six for tests.unit.modules.zypper_test.py --- tests/unit/modules/zypper_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/modules/zypper_test.py b/tests/unit/modules/zypper_test.py index cb9980ae54..d6789bc08d 100644 --- a/tests/unit/modules/zypper_test.py +++ b/tests/unit/modules/zypper_test.py @@ -5,9 +5,11 @@ # Import Python Libs from __future__ import absolute_import +import os # Import Salt Testing Libs from salttesting import TestCase, skipIf +from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( Mock, MagicMock, @@ -16,16 +18,14 @@ from salttesting.mock import ( NO_MOCK, NO_MOCK_REASON ) -from salt.exceptions import CommandExecutionError - -import os -from salt.ext.six.moves import configparser -import StringIO - -from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') +# Import Salt libs +from salt.exceptions import CommandExecutionError +from salt.ext.six.moves import configparser +import salt.ext.six as six + class ZyppCallMock(object): def __init__(self, return_value=None): @@ -443,7 +443,7 @@ class ZypperTestCase(TestCase): ''' repos_cfg = configparser.ConfigParser() for cfg in ['zypper-repo-1.cfg', 'zypper-repo-2.cfg']: - repos_cfg.readfp(StringIO.StringIO(get_test_data(cfg))) + repos_cfg.readfp(six.StringIO.StringIO(get_test_data(cfg))) for alias in repos_cfg.sections(): r_info = zypper._get_repo_info(alias, repos_cfg=repos_cfg)