#NEWLINE# def test_ensures_file_is_writable_before_sending( self ) : #NEWLINE# #INDENT# outfile = os . sep . join ( [ '' , 'does' , 'not' , 'exist_' , 'file.txt' ] ) #NEWLINE# self . parsed_response = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# cmdline = 'iot create-certificate-from-csr' #NEWLINE# cmdline += ' --certificate-signing-request "abc"' #NEWLINE# cmdline += ( ' --certificate-pem-outfile ' + outfile ) #NEWLINE# self . assert_params_for_cmd ( cmdline , stderr_contains = 'Unable to write to file: ' , expected_rc = 255 )