Merge pull request #426 from OpenKMIP/feat/add-check-to-factory

Add Check support to the payload factories
This commit is contained in:
Peter Hamilton 2018-04-17 09:05:44 -04:00 committed by GitHub
commit 583559195f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -40,6 +40,9 @@ class RequestPayloadFactory(PayloadFactory):
def _create_locate_payload(self):
return payloads.LocateRequestPayload()
def _create_check_payload(self):
return payloads.CheckRequestPayload()
def _create_get_payload(self):
return payloads.GetRequestPayload()

View File

@ -40,6 +40,9 @@ class ResponsePayloadFactory(PayloadFactory):
def _create_locate_payload(self):
return payloads.LocateResponsePayload()
def _create_check_payload(self):
return payloads.CheckResponsePayload()
def _create_get_payload(self):
return payloads.GetResponsePayload()

View File

@ -77,7 +77,8 @@ class TestRequestPayloadFactory(testtools.TestCase):
self._test_payload_type(payload, payloads.LocateRequestPayload)
def test_create_check_payload(self):
self._test_not_implemented(self.factory.create, enums.Operation.CHECK)
payload = self.factory.create(enums.Operation.CHECK)
self._test_payload_type(payload, payloads.CheckRequestPayload)
def test_create_get_payload(self):
payload = self.factory.create(enums.Operation.GET)

View File

@ -77,7 +77,8 @@ class TestResponsePayloadFactory(testtools.TestCase):
self._test_payload_type(payload, payloads.LocateResponsePayload)
def test_create_check_payload(self):
self._test_not_implemented(self.factory.create, enums.Operation.CHECK)
payload = self.factory.create(enums.Operation.CHECK)
self._test_payload_type(payload, payloads.CheckResponsePayload)
def test_create_get_payload(self):
payload = self.factory.create(enums.Operation.GET)