def test_password(self):
        """
        Test that the client can authentication with a password.  This
        includes changing the password.
        """
        self.authClient.ssh_USERAUTH_FAILURE(NS(b'password') + b'\x00')
        self.assertEqual(self.authClient.transport.packets[-1],
                (userauth.MSG_USERAUTH_REQUEST, NS(b'foo') + NS(b'nancy')
                    + NS(b'password') + b'\x00' + NS(b'foo')))
        self.authClient.ssh_USERAUTH_PK_OK(NS(b'') + NS(b''))
        self.assertEqual(self.authClient.transport.packets[-1],
                (userauth.MSG_USERAUTH_REQUEST, NS(b'foo') + NS(b'nancy')
                    + NS(b'password') + b'\xff' + NS(b'foo') * 2))

        Test that the client can authentication with a password.  This
        includes changing the password.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_userauth.py