2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-18 17:23:52 +00:00

Adding OperationPolicyName

This change adds the OperationPolicyName attribute, extending support to
the AttributeValueFactory. Test cases are included for the creation
process for both the factory and the individual attribute.
This commit is contained in:
Peter Hamilton
2014-12-02 10:43:58 -05:00
parent b99bf8cbf4
commit 3918c320fd
4 changed files with 64 additions and 1 deletions

View File

@@ -15,6 +15,8 @@
from testtools import TestCase
from kmip.core.attributes import OperationPolicyName
from kmip.core.utils import BytearrayStream
@@ -60,3 +62,24 @@ class TestName(TestCase):
def test_maximum_read(self):
self.skip('Not implemented')
class TestOperationPolicyName(TestCase):
def setUp(self):
super(TestOperationPolicyName, self).setUp()
def tearDown(self):
super(TestOperationPolicyName, self).tearDown()
def _test_operation_policy_name(self, value):
opn = OperationPolicyName(value)
msg = "expected {0}, received {1}".format(value, opn.value)
self.assertEqual(value, opn.value, msg)
def test_operation_policy_name(self):
self._test_operation_policy_name('test')
def test_operation_policy_name_on_none(self):
self._test_operation_policy_name(None)