2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-20 10:13:18 +00:00

Update the object data model to support storing key wrapping data

This change updates the KMIP object model to support explicitly
storing key wrapping data attributes. Key wrapping data is treated
externally as a dictionary and is stored as individual fields in
the back end. Various unit tests have been updated and added to
support these additions.
This commit is contained in:
Peter Hamilton
2017-09-30 16:22:52 -04:00
parent aa798d939c
commit fc86e1bef4
8 changed files with 736 additions and 30 deletions

View File

@@ -94,3 +94,17 @@ class TestKey(TestCase):
"""
dummy = DummyKey()
self.assertFalse(dummy != dummy)
def test_key_wrapping_data_invalid(self):
"""
Test that the right error is raised when setting the key wrapping
data with an invalid value.
"""
dummy = DummyKey()
args = (dummy, 'key_wrapping_data', 'invalid')
self.assertRaisesRegexp(
TypeError,
"Key wrapping data must be a dictionary.",
setattr,
*args
)