'L{twisted.python.compat.raw_input}'

def test_raw_input(self):

    class FakeStdin:
        def readline(self):
            return 'User    input\n'
    class FakeStdout:
        data = ''
        def write(self, data):
            self.data += data
    self.patch(sys, 'stdin', FakeStdin())
    stdout = FakeStdout()
    self.patch(sys, 'stdout', stdout)
    self.assertEqual(raw_input('Prompt'), 'User    input')
    self.assertEqual(stdout.data, 'Prompt')
