Increase version of hacking and pycodestyle

Fix errors in unit tests

Change-Id: Ibc8648b64887daac6fb5ec8a6dd61d9312a52ef3
This commit is contained in:
Riccardo Pittau 2021-07-29 11:19:36 +02:00
parent 611a543ecd
commit 9cfd98e577
2 changed files with 8 additions and 8 deletions

View File

@ -163,7 +163,7 @@ class TestCallWithRetries(unittest.TestCase):
def test_no_retries_on_python_error(self): def test_no_retries_on_python_error(self):
self.call.side_effect = RuntimeError('boom') self.call.side_effect = RuntimeError('boom')
self.assertRaisesRegexp(RuntimeError, 'boom', self.assertRaisesRegex(RuntimeError, 'boom',
ir_utils.call_with_retries, ir_utils.call_with_retries,
self.call, 'meow', answer=42) self.call, 'meow', answer=42)
self.call.assert_called_once_with('meow', answer=42) self.call.assert_called_once_with('meow', answer=42)
@ -182,7 +182,7 @@ class TestCallWithRetries(unittest.TestCase):
@mock.patch('time.sleep', lambda _x: None) @mock.patch('time.sleep', lambda _x: None)
def test_retries_on_ironicclient_error_with_failure(self): def test_retries_on_ironicclient_error_with_failure(self):
self.call.side_effect = os_exc.SDKException('boom') self.call.side_effect = os_exc.SDKException('boom')
self.assertRaisesRegexp(os_exc.SDKException, 'boom', self.assertRaisesRegex(os_exc.SDKException, 'boom',
ir_utils.call_with_retries, ir_utils.call_with_retries,
self.call, 'meow', answer=42) self.call, 'meow', answer=42)
self.call.assert_called_with('meow', answer=42) self.call.assert_called_with('meow', answer=42)

View File

@ -54,8 +54,8 @@ commands =
usedevelop = False usedevelop = False
deps = deps =
flake8-import-order>=0.17.1 # LGPLv3 flake8-import-order>=0.17.1 # LGPLv3
hacking>=3.1.0,<4.0.0 # Apache-2.0 hacking>=4.1.0,<5.0.0 # Apache-2.0
pycodestyle>=2.0.0,<2.7.0 # MIT pycodestyle>=2.0.0,<3.0.0 # MIT
doc8>=0.8.1 # Apache-2.0 doc8>=0.8.1 # Apache-2.0
commands = commands =
flake8 ironic_inspector flake8 ironic_inspector