def test_unsupported_operation(self):
"""
Test that an OperationNotSupported error is generated when invoking
an operation not supported by the server.
"""
e = engine.KmipEngine()
e._logger = mock.MagicMock()
args = (enums.Operation.POLL, None)
regex = "{0} operation is not supported by the server.".format(
args[0].name.title()
)
six.assertRaisesRegex(
self,
exceptions.OperationNotSupported,
regex,
e._process_operation,
*args
)
评论列表
文章目录