def test_parsingRaisesIllegalOperationResponse(self):
        """
        When a parsing method raises L{IllegalOperation}, the server
        sends a C{NO} response.
        """
        self.assertParseExceptionResponse(
            imap4.IllegalOperation("operation"),
            b"001", b"NO Illegal operation: operation\r\n",
        )

        When a parsing method raises L{IllegalOperation}, the server
        sends a C{NO} response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py