From ceaff6d7ac215b2e3c7287b49479d2a51bb53ae6 Mon Sep 17 00:00:00 2001 From: Wyllys Ingersoll Date: Thu, 11 Sep 2014 18:15:52 -0400 Subject: [PATCH] Fixed typos --- kmip/core/attributes.py | 9 +++++---- kmip/core/server.py | 2 +- kmip/tests/core/test_server.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kmip/core/attributes.py b/kmip/core/attributes.py index f73d4ff..08bad52 100644 --- a/kmip/core/attributes.py +++ b/kmip/core/attributes.py @@ -86,20 +86,21 @@ class Name(Struct): def __validate(self): name = self.__class__.__name__ + msg = ErrorStrings.BAD_EXP_RECV if self.name_value and \ not isinstance(self.name_value, Name.NameValue) and \ not isinstance(self.name_value, str): member = 'name_value' raise TypeError(msg.format('{}.{}'.format(name, member), - 'name_value', type(Name.NameValue), - type(name_type))) + 'name_value', type(Name.NameValue), + type(self.name_value))) if self.name_type and \ not isinstance(self.name_type, Name.NameType) and \ not isinstance(self.name_type, str): member = 'name_type' raise TypeError(msg.format('{}.{}'.format(name, member), - 'name_type', type(Name.NameType), - type(self.name_type))) + 'name_type', type(Name.NameType), + type(self.name_type))) @classmethod def create(cls, name_value, name_type): diff --git a/kmip/core/server.py b/kmip/core/server.py index e297868..e45d4e2 100644 --- a/kmip/core/server.py +++ b/kmip/core/server.py @@ -265,7 +265,7 @@ class KMIPImpl(KMIP): object_group_member, attributes) return LocateResult(ResultStatus(RS.SUCCESS), uuids=uuids) except NotImplementedError: - msg = ResultMessage('Locate Operation Not Supported')) + msg = ResultMessage('Locate Operation Not Supported') reason = ResultReason(ResultReasonEnum.OPERATION_NOT_SUPPORTED) return LocateResult(ResultStatus(RS.OPERATION_FAILED), result_reason=reason, diff --git a/kmip/tests/core/test_server.py b/kmip/tests/core/test_server.py index 71292b4..59044ed 100644 --- a/kmip/tests/core/test_server.py +++ b/kmip/tests/core/test_server.py @@ -525,5 +525,5 @@ class TestKMIPServer(TestCase): attrs = [nameattr] res = self.kmip.locate(attributes=attrs) - self.assertEqual(ResultStatus.SUCCESS, res.result_status.enum, + self.assertEqual(ResultStatus.OPERATION_FAILED, res.result_status.enum, 'locate result status did not return success')