def test_USERAUTH_PK_OK_unknown_method(self):
        """
        If C{SSHUserAuthClient} gets a MSG_USERAUTH_PK_OK packet when it's not
        expecting it, it should fail the current authentication and move on to
        the next type.
        """
        self.authClient.lastAuth = b'unknown'
        self.authClient.transport.packets = []
        self.authClient.ssh_USERAUTH_PK_OK(b'')
        self.assertEqual(self.authClient.transport.packets,
                          [(userauth.MSG_USERAUTH_REQUEST, NS(b'foo') +
                            NS(b'nancy') + NS(b'none'))])

        If C{SSHUserAuthClient} gets a MSG_USERAUTH_PK_OK packet when it's not
        expecting it, it should fail the current authentication and move on to
        the next type.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_userauth.py