mirror of https://github.com/OpenKMIP/PyKMIP.git
Merge pull request #10 from OpenKMIP/bug/fix-key-material-tag
Fixing invalid tag for the KeyMaterialStruct
This commit is contained in:
commit
883a36f22a
|
@ -442,7 +442,7 @@ class KeyMaterial(ByteString):
|
|||
class KeyMaterialStruct(Struct):
|
||||
|
||||
def __init__(self):
|
||||
super(KeyMaterialStruct, self).__init__(Tags.SERVER_INFORMATION)
|
||||
super(KeyMaterialStruct, self).__init__(Tags.KEY_MATERIAL)
|
||||
|
||||
self.data = BytearrayStream()
|
||||
|
||||
|
|
|
@ -16,9 +16,35 @@
|
|||
from six import string_types
|
||||
from testtools import TestCase
|
||||
|
||||
from kmip.core.enums import Tags
|
||||
|
||||
from kmip.core.objects import ExtensionName
|
||||
from kmip.core.objects import ExtensionTag
|
||||
from kmip.core.objects import ExtensionType
|
||||
from kmip.core.objects import KeyMaterialStruct
|
||||
|
||||
|
||||
class TestKeyMaterialStruct(TestCase):
|
||||
"""
|
||||
A test suite for the KeyMaterialStruct.
|
||||
|
||||
A placeholder test suite. Should be removed when KeyMaterialStruct is
|
||||
removed from the code base.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(TestKeyMaterialStruct, self).setUp()
|
||||
|
||||
def tearDown(self):
|
||||
super(TestKeyMaterialStruct, self).tearDown()
|
||||
|
||||
def test_valid_tag(self):
|
||||
"""
|
||||
Test that the KeyMaterialStruct tag is valid.
|
||||
"""
|
||||
struct = KeyMaterialStruct()
|
||||
|
||||
self.assertEqual(Tags.KEY_MATERIAL, struct.tag)
|
||||
|
||||
|
||||
class TestExtensionName(TestCase):
|
||||
|
|
Loading…
Reference in New Issue