From ca7a46b113c64edd87bfa7b9f56fdb97a0c96dd6 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Thu, 28 Nov 2019 17:10:40 +0100 Subject: Stop using six library Since we've dropped support for Python 2.7, it's time to look at the bright future that Python 3.x will bring and stop forcing compatibility with older versions. This patch removes the six library from requirements, not looking back. Change-Id: I4795417aa649be75ba7162a8cf30eacbb88c7b5e --- ironic_python_agent/tests/unit/hardware_managers/test_cna.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ironic_python_agent/tests/unit/hardware_managers') diff --git a/ironic_python_agent/tests/unit/hardware_managers/test_cna.py b/ironic_python_agent/tests/unit/hardware_managers/test_cna.py index 3253ad4c..0f3af3a2 100644 --- a/ironic_python_agent/tests/unit/hardware_managers/test_cna.py +++ b/ironic_python_agent/tests/unit/hardware_managers/test_cna.py @@ -84,7 +84,7 @@ class TestIntelCnaHardwareManager(base.IronicAgentTest): mock_exists.return_value = True mock_listdir.return_value = ['foo', 'bar'] write_mock = mock.mock_open() - with mock.patch('six.moves.builtins.open', write_mock, create=True): + with mock.patch('builtins.open', write_mock, create=True): cna._disable_embedded_lldp_agent_in_cna_card() write_mock().write.assert_called_with('lldp stop') self.assertFalse(mock_log.warning.called) @@ -107,7 +107,7 @@ class TestIntelCnaHardwareManager(base.IronicAgentTest): listdir_dict = ['foo', 'bar'] mock_listdir.return_value = listdir_dict write_mock = mock.mock_open() - with mock.patch('six.moves.builtins.open', write_mock, create=True): + with mock.patch('builtins.open', write_mock, create=True): write_mock.side_effect = IOError('fake error') cna._disable_embedded_lldp_agent_in_cna_card() expected_log_message = ('Failed to disable the embedded LLDP on ' -- cgit v1.2.1