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)) Change-Id: I651b2dde7af462cd980d07d4b247cfac4896b76e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
2a4b304ced
commit
4754451138
@ -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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user