#NEWLINE# def testEnrollingCommunicator( self ) : #NEWLINE# #INDENT# 'Test that the ClientCommunicator generates good keys.' #NEWLINE# self . client_communicator = comms . ClientCommunicator ( certificate = '' ) #NEWLINE# self . client_communicator . LoadServerCertificate ( self . server_certificate , config_lib . CONFIG [ 'CA.certificate' ] ) #NEWLINE# req = X509 . load_request_string ( self . client_communicator . GetCSR ( ) ) #NEWLINE# public_key = req . get_pubkey ( ) . get_rsa ( ) . pub ( ) [ 1 ] #NEWLINE# cn = rdf_client . ClientURN . FromPublicKey ( self ) #NEWLINE# self . assertEqual ( cn , req . get_subject ( ) . CN )