tests: Address UserWarning in tests
Address the following warning raised when running tests:
.../oslo_i18n/_message.py:173: UserWarning: Failed to insert
replacement values into translated message Key manager error:
%(reason)s (Original: 'Key manager error: %(reason)s'): 'reason'
warnings.warn(msg % (translated_message, self.msgid, err))
@@ -667,8 +667,10 @@ class CreateVolumeFlowTestCase(test.TestCase):
fake_key_manager = mock_key_manager.MockKeyManager()
volume_type = {'name': 'type1', 'id': 1}
- with mock.patch.object(fake_key_manager, 'create_key',
- side_effect=castellan_exc.KeyManagerError):
+ with mock.patch.object(
+ fake_key_manager, 'create_key',
+ side_effect=castellan_exc.KeyManagerError('foo')
+ ):
with mock.patch.object(fake_key_manager, 'get',
return_value=fakes.ENCRYPTION_KEY_ID):
