From 09d6e6feef33fa47bca440a096894b851b1ebca5 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 14 Jun 2018 20:51:41 +0200 Subject: Add py3 support in tempest and rally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I009d38a0db409ab4ec641cba9173ab2386d0ce2a Signed-off-by: Cédric Ollivier --- functest/tests/unit/openstack/tempest/test_conf_utils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'functest/tests/unit/openstack/tempest/test_conf_utils.py') diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index bc3c983b6..6f44337c9 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -156,16 +156,13 @@ class OSTempestConfUtilsTesting(unittest.TestCase): self.assertTrue(mock_get_did.called) def _test_missing_param(self, params, image_id, flavor_id, alt=False): - with mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' + with mock.patch('six.moves.configparser.RawConfigParser.' 'set') as mset, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' + mock.patch('six.moves.configparser.RawConfigParser.' 'read') as mread, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' + mock.patch('six.moves.configparser.RawConfigParser.' 'write') as mwrite, \ - mock.patch('__builtin__.open', mock.mock_open()), \ + mock.patch('six.moves.builtins.open', mock.mock_open()), \ mock.patch('functest.utils.functest_utils.yaml.safe_load', return_value={'validation': {'ssh_timeout': 300}}): os.environ['OS_INTERFACE'] = '' -- cgit 1.2.3-korg