#NEWLINE# def testDialogGetStringWithSpecialCharacters( self ) : #NEWLINE# #INDENT# 'Test DialogGetString() with special characters in the prompt.' #NEWLINE# self . mox . StubOutWithMock ( self . asr , 'ExecuteAndUnpack' ) #NEWLINE# ret = ( 'hello' , False ) #NEWLINE# prompt = 'prompt "quoted"' #NEWLINE# prompt_escaped = 'prompt \\"quoted\\"' #NEWLINE# self . asr . ExecuteAndUnpack ( ( self . asr . GENERIC_DIALOG % ( prompt_escaped , 'default answer ""' ) ) , 'sb' , 1 ) . AndReturn ( ret ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertEqual ( 'hello' , self . asr . DialogGetString ( prompt , args = [ 1 ] ) ) #NEWLINE# self . mox . VerifyAll ( )