#NEWLINE# def test_register_invalid_alg( self ) : #NEWLINE# #INDENT# unsupported_algs = ( CryptoAlgorithmEnum . RSA , CryptoAlgorithmEnum . DSA , CryptoAlgorithmEnum . ECDSA , CryptoAlgorithmEnum . HMAC_SHA1 , CryptoAlgorithmEnum . HMAC_SHA224 , CryptoAlgorithmEnum . HMAC_SHA256 , CryptoAlgorithmEnum . HMAC_SHA384 , CryptoAlgorithmEnum . HMAC_SHA512 , CryptoAlgorithmEnum . HMAC_MD5 , CryptoAlgorithmEnum . DH , CryptoAlgorithmEnum . ECDH , CryptoAlgorithmEnum . ECMQV , CryptoAlgorithmEnum . BLOWFISH , CryptoAlgorithmEnum . CAMELLIA , CryptoAlgorithmEnum . CAST5 , CryptoAlgorithmEnum . IDEA , CryptoAlgorithmEnum . MARS , CryptoAlgorithmEnum . RC2 , CryptoAlgorithmEnum . RC4 , CryptoAlgorithmEnum . RC5 , CryptoAlgorithmEnum . SKIPJACK , CryptoAlgorithmEnum . TWOFISH ) #NEWLINE# for alg in unsupported_algs : #NEWLINE# #INDENT# obj_type = ObjectType ( ObjectTypeEnum . SYMMETRIC_KEY ) #NEWLINE# key = self . _get_symmetric_key ( ) #NEWLINE# key . key_block . cryptographic_algorithm = CryptographicAlgorithm ( alg ) #NEWLINE# attributes = [ ] #NEWLINE# template_attribute = TemplateAttribute ( attributes = attributes ) #NEWLINE# res = self . kmip . register ( obj_type , template_attribute , key ) #NEWLINE# self . assertEqual ( ResultStatus . OPERATION_FAILED , res . result_status . value , 'result status did not return failed' ) #NEWLINE# self . assertEqual ( ResultReason . INVALID_FIELD , attributes . result_reason . value , 'result reason did not match' )