def test_is_attribute_removed_in_kmip_2_0(self): result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_1_0 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_1_1 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_1_2 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_1_3 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_1_4 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.CUSTOM_ATTRIBUTE, enums.KMIPVersion.KMIP_2_0 ) self.assertFalse(result)
def test_is_attribute_added_in_kmip_2_0(self): result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_1_0 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_1_1 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_1_2 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_1_3 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_1_4 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.QUANTUM_SAFE, enums.KMIPVersion.KMIP_2_0 ) self.assertTrue(result)
def test_is_attribute_added_in_kmip_1_3(self): result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_1_0 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_1_1 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_1_2 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_1_3 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_1_4 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.RANDOM_NUMBER_GENERATOR, enums.KMIPVersion.KMIP_2_0 ) self.assertTrue(result)
def test_is_attribute_added_in_kmip_1_2(self): result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_1_0 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_1_1 ) self.assertFalse(result) result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_1_2 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_1_3 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_1_4 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.KEY_VALUE_PRESENT, enums.KMIPVersion.KMIP_2_0 ) self.assertTrue(result)
def test_is_attribute_added_in_kmip_1_0(self): result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_1_0 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_1_1 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_1_2 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_1_3 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_1_4 ) self.assertTrue(result) result = enums.is_attribute( enums.Tags.UNIQUE_IDENTIFIER, enums.KMIPVersion.KMIP_2_0 ) self.assertTrue(result)
def test_is_attribute(self): # Test an attribute introduced in KMIP 1.0 result = enums.is_attribute(enums.Tags.UNIQUE_IDENTIFIER) self.assertTrue(result) # Test an attribute introduced in KMIP 1.1 result = enums.is_attribute(enums.Tags.FRESH) self.assertTrue(result) # Test an attribute introduced in KMIP 1.2 result = enums.is_attribute(enums.Tags.KEY_VALUE_PRESENT) self.assertTrue(result) # Test an attribute introduced in KMIP 1.3 result = enums.is_attribute(enums.Tags.RANDOM_NUMBER_GENERATOR) self.assertTrue(result) # Test an attribute introduced in KMIP 1.4 result = enums.is_attribute(enums.Tags.COMMENT) self.assertTrue(result) # Test an attribute introduced in KMIP 2.0 result = enums.is_attribute(enums.Tags.QUANTUM_SAFE) self.assertTrue(result)