#NEWLINE# def test_saves_cert_to_file_for_create_certificate_from_csr( self ) : #NEWLINE# #INDENT# self . parsed_response = { #NEWLINE# #INDENT# 'certificatePem' : 'cert...' , #NEWLINE# 'ResponseMetadata' : { #NEWLINE# #INDENT# 'HTTPStatusCode' : 200 , #NEWLINE# 'RequestId' : 'request-id' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# outfile = self . files . full_path ( 'cert.pem' ) #NEWLINE# cmdline = 'iot create-certificate-from-csr' #NEWLINE# cmdline += ' --certificate-signing-request "abc"' #NEWLINE# cmdline += ( ' --certificate-pem-outfile ' + outfile ) #NEWLINE# self . run_cmd ( cmdline , 0 ) #NEWLINE# self . assertTrue ( os . path . exists ( outfile ) ) #NEWLINE# with open ( outfile ) as fp : #NEWLINE# #INDENT# self . assertEquals ( 'cert...' , fp . read ( ) )