From 7faaf75948aec53dfe4f294470346ec464c74731 Mon Sep 17 00:00:00 2001 From: tushargite96 Date: Wed, 10 Feb 2021 20:43:52 +0530 Subject: [PATCH] Move os-brick to new hacking 4.0.0 Change-Id: I24704ab5b74b2f5bdc5b2343ed5ea1ae6acfe973 --- os_brick/tests/initiator/connectors/test_rbd.py | 2 +- os_brick/tests/initiator/test_connector.py | 6 +++--- test-requirements.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/os_brick/tests/initiator/connectors/test_rbd.py b/os_brick/tests/initiator/connectors/test_rbd.py index 6d4f22cec..b49683e02 100644 --- a/os_brick/tests/initiator/connectors/test_rbd.py +++ b/os_brick/tests/initiator/connectors/test_rbd.py @@ -196,7 +196,7 @@ class RBDConnectorTestCase(test_base_rbd.RBDConnectorTestMixin, '--mon_host', '192.168.10.2:6789'] execute_call2 = mock.call(*cmd, root_helper=None, run_as_root=True) mock_execute.assert_has_calls([execute_call1]) - self.assertFalse(execute_call2 in mock_execute.mock_calls) + self.assertNotIn(execute_call2, mock_execute.mock_calls) expected_info = {'path': '/dev/rbd/pool/image', 'type': 'block'} self.assertEqual(expected_info, device_info) diff --git a/os_brick/tests/initiator/test_connector.py b/os_brick/tests/initiator/test_connector.py index d4008d6e7..eebd341f3 100644 --- a/os_brick/tests/initiator/test_connector.py +++ b/os_brick/tests/initiator/test_connector.py @@ -197,9 +197,9 @@ class ConnectorTestCase(test_base.TestCase): @mock.patch('sys.platform', 'win32') def test_get_connector_mapping_win32(self): mapping_win32 = connector.get_connector_mapping() - self.assertTrue('ISCSI' in mapping_win32) - self.assertTrue('RBD' in mapping_win32) - self.assertFalse('STORPOOL' in mapping_win32) + self.assertIn('ISCSI', mapping_win32) + self.assertIn('RBD', mapping_win32) + self.assertNotIn('STORPOOL', mapping_win32) @mock.patch('os_brick.initiator.connector.platform.machine') def test_get_connector_mapping(self, mock_platform_machine): diff --git a/test-requirements.txt b/test-requirements.txt index cd904e594..a337b6171 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=3.1.0,<3.2.0 # Apache-2.0 +hacking>=4.0.0,<4.1.0 # Apache-2.0 flake8-import-order # LGPLv3 coverage>=5.2.1 # Apache-2.0 ddt>=1.4.1 # MIT