'L{ConsoleUI.prompt} writes a message to the console, then reads a line.
If that line is neither \'yes\' nor \'no\', then it says "Please enter
\'yes\' or \'no\'" until it gets a \'yes\' or a \'no\', at which point it
returns a Deferred that answers either True or False.'

def test_promptRepeatedly(self):

    self.newFile(['what', 'uh', 'okay', 'yes'])
    l = []
    self.ui.prompt('Please    say    something    useful.').addCallback(l.append)
    self.assertEqual([True], l)
    self.assertEqual(self.fakeFile.outchunks, (['Please    say    something    useful.'] + (["Please    type    'yes'    or    'no':    "] * 3)))
    self.assertTrue(self.fakeFile.closed)
    self.newFile(['blah', 'stuff', 'feh', 'no'])
    l = []
    self.ui.prompt('Please    say    something    negative.').addCallback(l.append)
    self.assertEqual([False], l)
    self.assertEqual(self.fakeFile.outchunks, (['Please    say    something    negative.'] + (["Please    type    'yes'    or    'no':    "] * 3)))
    self.assertTrue(self.fakeFile.closed)
