mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-21 21:14:24 +02:00
Fixing invalid tag for the KeyMaterialStruct
This commit is contained in:
parent
71936f8c37
commit
cb550aef7a
@ -442,7 +442,7 @@ class KeyMaterial(ByteString):
|
|||||||
class KeyMaterialStruct(Struct):
|
class KeyMaterialStruct(Struct):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(KeyMaterialStruct, self).__init__(Tags.SERVER_INFORMATION)
|
super(KeyMaterialStruct, self).__init__(Tags.KEY_MATERIAL)
|
||||||
|
|
||||||
self.data = BytearrayStream()
|
self.data = BytearrayStream()
|
||||||
|
|
||||||
|
@ -16,9 +16,35 @@
|
|||||||
from six import string_types
|
from six import string_types
|
||||||
from testtools import TestCase
|
from testtools import TestCase
|
||||||
|
|
||||||
|
from kmip.core.enums import Tags
|
||||||
|
|
||||||
from kmip.core.objects import ExtensionName
|
from kmip.core.objects import ExtensionName
|
||||||
from kmip.core.objects import ExtensionTag
|
from kmip.core.objects import ExtensionTag
|
||||||
from kmip.core.objects import ExtensionType
|
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):
|
class TestExtensionName(TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user