Browse Source

Merge "Remove remaining reference to the six library"

changes/32/824932/1
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
b14c078505
  1. 8
      tripleo_common/tests/image/test_base.py
  2. 2
      tripleo_common/tests/utils/test_config.py

8
tripleo_common/tests/image/test_base.py

@ -35,7 +35,7 @@ class TestBaseImageManager(testbase.TestCase):
mock_open_context = mock.mock_open()
mock_open_context().read.return_value = "YAML"
with mock.patch('six.moves.builtins.open', mock_open_context):
with mock.patch('builtins.open', mock_open_context):
base_manager = BaseImageManager(['yamlfile'])
disk_images = base_manager.load_config_files('disk_images')
@ -82,7 +82,7 @@ class TestBaseImageManager(testbase.TestCase):
mock_open_context = mock.mock_open()
mock_open_context().read.return_value = "YAML"
with mock.patch('six.moves.builtins.open', mock_open_context):
with mock.patch('builtins.open', mock_open_context):
base_manager = BaseImageManager(['yamlfile1', 'yamlfile2'])
disk_images = base_manager.load_config_files('disk_images')
@ -119,7 +119,7 @@ class TestBaseImageManager(testbase.TestCase):
mock_open_context = mock.mock_open()
mock_open_context().read.return_value = "YAML"
with mock.patch('six.moves.builtins.open', mock_open_context):
with mock.patch('builtins.open', mock_open_context):
base_manager = BaseImageManager(['yamlfile'])
self.assertRaises(ImageSpecificationException,
base_manager.load_config_files, 'disk_images')
@ -151,7 +151,7 @@ class TestBaseImageManager(testbase.TestCase):
mock_open_context = mock.mock_open()
mock_open_context().read.return_value = "YAML"
with mock.patch('six.moves.builtins.open', mock_open_context):
with mock.patch('builtins.open', mock_open_context):
base_manager = BaseImageManager(['yamlfile1'],
images=['not-overcloud'])
disk_images = base_manager.load_config_files('disk_images')

2
tripleo_common/tests/utils/test_config.py

@ -129,7 +129,7 @@ class TestConfig(base.TestCase):
@patch.object(ooo_config.git, 'Repo')
@mock.patch('os.mkdir')
@mock.patch('six.moves.builtins.open')
@mock.patch('builtins.open')
@patch.object(ooo_config.shutil, 'rmtree')
def test_overcloud_config_wrong_config_type(self, mock_rmtree,
mock_open, mock_mkdir,

Loading…
Cancel
Save