aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit/ci
diff options
context:
space:
mode:
authorVincent Danno <vincent.danno@orange.com>2021-05-26 13:08:55 +0200
committerVincent Danno <vincent.danno@orange.com>2021-06-01 20:40:32 +0200
commita656fd764b0a608caaf198bfa9685a09a7eaca16 (patch)
tree501fa47e06658b8a43e2ccca4837c530a49dfc72 /xtesting/tests/unit/ci
parent6192b2cf9ffd46bdb8189ce3236cf4d9b722b69c (diff)
Drop six
python 2 was dropped [1] so we don't need six anymore [1]: https://gerrit.opnfv.org/gerrit/c/functest-xtesting/+/68262 Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2
Diffstat (limited to 'xtesting/tests/unit/ci')
-rw-r--r--xtesting/tests/unit/ci/test_run_tests.py4
-rw-r--r--xtesting/tests/unit/ci/test_tier_builder.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/xtesting/tests/unit/ci/test_run_tests.py b/xtesting/tests/unit/ci/test_run_tests.py
index 423bf486..b206a493 100644
--- a/xtesting/tests/unit/ci/test_run_tests.py
+++ b/xtesting/tests/unit/ci/test_run_tests.py
@@ -94,7 +94,7 @@ class RunTestsTesting(unittest.TestCase):
except Exception: # pylint: disable=broad-except
pass
envfile = 'rc_file'
- with mock.patch('six.moves.builtins.open',
+ with mock.patch('builtins.open',
mock.mock_open(read_data=msg)) as mock_method,\
mock.patch('os.path.isfile', return_value=True):
mock_method.return_value.__iter__ = lambda self: iter(
@@ -117,7 +117,7 @@ class RunTestsTesting(unittest.TestCase):
'export "\'OS_TENANT_NAME\'" = "\'admin\'"')
def test_get_dict_by_test(self):
- with mock.patch('six.moves.builtins.open', mock.mock_open()), \
+ with mock.patch('builtins.open', mock.mock_open()), \
mock.patch('yaml.safe_load') as mock_yaml:
mock_obj = mock.Mock()
testcase_dict = {'case_name': 'testname',
diff --git a/xtesting/tests/unit/ci/test_tier_builder.py b/xtesting/tests/unit/ci/test_tier_builder.py
index 70b5aeae..091142e2 100644
--- a/xtesting/tests/unit/ci/test_tier_builder.py
+++ b/xtesting/tests/unit/ci/test_tier_builder.py
@@ -38,7 +38,7 @@ class TierBuilderTesting(unittest.TestCase):
with mock.patch('xtesting.ci.tier_builder.yaml.safe_load',
return_value=self.mock_yaml), \
- mock.patch('six.moves.builtins.open', mock.mock_open()):
+ mock.patch('builtins.open', mock.mock_open()):
os.environ["INSTALLER_TYPE"] = 'test_installer'
os.environ["DEPLOY_SCENARIO"] = 'test_scenario'
self.tierbuilder = tier_builder.TierBuilder('testcases_file')