aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/ci/test_check_deployment.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-12-11 06:47:33 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2017-12-11 06:47:33 +0100
commit41a81e7f5ca5d3733e6e5655f5ece7859ce9f49b (patch)
treebc72a160c838239a535b86669bed3df125690154 /functest/tests/unit/ci/test_check_deployment.py
parent5f5833f4308322892893fb07aa1898bc1406a32d (diff)
Add Python3 support in functest/ci
Change-Id: If13bfaa196b8dfab1e83feb28c5a4719c7acd8c7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/ci/test_check_deployment.py')
-rw-r--r--functest/tests/unit/ci/test_check_deployment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/functest/tests/unit/ci/test_check_deployment.py b/functest/tests/unit/ci/test_check_deployment.py
index 24e3ce53c..66d1b7afd 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)