def test_getGenericAnswers(self):
        """
        L{twisted.conch.client.default.SSHUserAuthClient.getGenericAnswers}
        """
        options = ConchOptions()
        client = SSHUserAuthClient(b"user",  options, None)

        def getpass(prompt):
            self.assertEqual(prompt, "pass prompt")
            return "getpass"

        self.patch(default.getpass, 'getpass', getpass)

        def raw_input(prompt):
            self.assertEqual(prompt, "raw_input prompt")
            return "raw_input"

        self.patch(default, 'raw_input', raw_input)
        d = client.getGenericAnswers(
            b"Name", b"Instruction", [
                (b"pass prompt", False), (b"raw_input prompt", True)])
        d.addCallback(
            self.assertListEqual, ["getpass", "raw_input"])
        return d

        L{twisted.conch.client.default.SSHUserAuthClient.getGenericAnswers}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_default.py