'Get the password using
L{twisted.conch.client.default.SSHUserAuthClient.getPassword}'

def test_getPassword(self):

    class FakeTransport:
        def __init__(self, host):
            self.transport = self
            self.host = host
        def getPeer(self):
            return self
    options = ConchOptions()
    client = SSHUserAuthClient('user', options, None)
    client.transport = FakeTransport('127.0.0.1')
    def getpass(prompt):
        self.assertEqual(prompt, "user@127.0.0.1's    password:    ")
        return 'bad    password'
    self.patch(default.getpass, 'getpass', getpass)
    d = client.getPassword()
    d.addCallback(self.assertEqual, 'bad    password')
    return d
