diff --git a/ironic_inspector/test/unit/test_common_ironic.py b/ironic_inspector/test/unit/test_common_ironic.py index 16cd65e94..a5b547e5a 100644 --- a/ironic_inspector/test/unit/test_common_ironic.py +++ b/ironic_inspector/test/unit/test_common_ironic.py @@ -163,9 +163,9 @@ class TestCallWithRetries(unittest.TestCase): def test_no_retries_on_python_error(self): self.call.side_effect = RuntimeError('boom') - self.assertRaisesRegexp(RuntimeError, 'boom', - ir_utils.call_with_retries, - self.call, 'meow', answer=42) + self.assertRaisesRegex(RuntimeError, 'boom', + ir_utils.call_with_retries, + self.call, 'meow', answer=42) self.call.assert_called_once_with('meow', answer=42) @mock.patch('time.sleep', lambda _x: None) @@ -182,9 +182,9 @@ class TestCallWithRetries(unittest.TestCase): @mock.patch('time.sleep', lambda _x: None) def test_retries_on_ironicclient_error_with_failure(self): self.call.side_effect = os_exc.SDKException('boom') - self.assertRaisesRegexp(os_exc.SDKException, 'boom', - ir_utils.call_with_retries, - self.call, 'meow', answer=42) + self.assertRaisesRegex(os_exc.SDKException, 'boom', + ir_utils.call_with_retries, + self.call, 'meow', answer=42) self.call.assert_called_with('meow', answer=42) self.assertEqual(5, self.call.call_count) diff --git a/tox.ini b/tox.ini index efd739615..a90900a57 100644 --- a/tox.ini +++ b/tox.ini @@ -54,8 +54,8 @@ commands = usedevelop = False deps = flake8-import-order>=0.17.1 # LGPLv3 - hacking>=3.1.0,<4.0.0 # Apache-2.0 - pycodestyle>=2.0.0,<2.7.0 # MIT + hacking>=4.1.0,<5.0.0 # Apache-2.0 + pycodestyle>=2.0.0,<3.0.0 # MIT doc8>=0.8.1 # Apache-2.0 commands = flake8 ironic_inspector