def test_unsupportedMethod(self):
        """
        An unsupported C{AUTHENTICATE} method results in a negative
        response.
        """
        server = imap4.IMAP4Server()
        server.portal = self.portal

        transport = StringTransport()
        server.makeConnection(transport)
        self.addCleanup(server.connectionLost,
                        error.ConnectionDone("Connection done."))

        transport.clear()

        server.dataReceived(b'001 AUTHENTICATE UNKNOWN\r\n')
        self.assertEqual(transport.value(),
                         b"001 NO AUTHENTICATE method unsupported\r\n")

        An unsupported C{AUTHENTICATE} method results in a negative
        response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py