#NEWLINE# def test_promptYes( self ) : #NEWLINE# #INDENT# "\n        L{ConsoleUI.prompt} writes a message to the console, then reads a line.\n        If that line is 'yes', then it returns a L{Deferred} that fires with\n        True.\n        " #NEWLINE# for okYes in [ 'yes' , 'Yes' , 'yes\n' ] : #NEWLINE# #INDENT# self . newFile ( [ okYes ] ) #NEWLINE# l = [ ] #NEWLINE# self . ui . prompt ( 'Hello, world!' ) . addCallback ( l . append ) #NEWLINE# self . assertEqual ( [ 'Hello, world!' ] , self . fakeFile . outchunks ) #NEWLINE# self . assertEqual ( [ True ] , l ) #NEWLINE# self . assertEqual ( True , self . fakeFile . closed )