aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit')
-rw-r--r--functest/tests/unit/ci/test_check_deployment.py4
-rw-r--r--functest/tests/unit/ci/test_tier_builder.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/functest/tests/unit/ci/test_check_deployment.py b/functest/tests/unit/ci/test_check_deployment.py
index 24e3ce53..66d1b7af 100644
--- a/functest/tests/unit/ci/test_check_deployment.py
+++ b/functest/tests/unit/ci/test_check_deployment.py
@@ -41,7 +41,7 @@ class CheckDeploymentTesting(unittest.TestCase):
def test_check_rc(self):
with mock.patch('functest.ci.check_deployment.os.path.isfile',
returns=True) as m, \
- mock.patch('__builtin__.open',
+ mock.patch('six.moves.builtins.open',
mock.mock_open(read_data='OS_AUTH_URL')):
self.deployment.check_rc()
self.assertTrue(m.called)
@@ -55,7 +55,7 @@ class CheckDeploymentTesting(unittest.TestCase):
self.assertTrue(msg in context)
def test_check_rc_missing_os_auth(self):
- with mock.patch('__builtin__.open',
+ with mock.patch('six.moves.builtins.open',
mock.mock_open(read_data='test')), \
self.assertRaises(Exception) as context:
msg = 'OS_AUTH_URL not defined in {}.'.format(self.rc_file)
diff --git a/functest/tests/unit/ci/test_tier_builder.py b/functest/tests/unit/ci/test_tier_builder.py
index 700c6e91..1dec9aed 100644
--- a/functest/tests/unit/ci/test_tier_builder.py
+++ b/functest/tests/unit/ci/test_tier_builder.py
@@ -39,7 +39,7 @@ class TierBuilderTesting(unittest.TestCase):
with mock.patch('functest.ci.tier_builder.yaml.safe_load',
return_value=self.mock_yaml), \
- mock.patch('__builtin__.open', mock.mock_open()):
+ mock.patch('six.moves.builtins.open', mock.mock_open()):
self.tierbuilder = tier_builder.TierBuilder('test_installer',
'test_scenario',
'testcases_file')