def test_parsingRaisesIllegalMailboxEncoding(self):
        """
        When a parsing method raises L{IllegalMailboxEncoding}, the
        server sends a C{NO} response.
        """
        self.assertParseExceptionResponse(
            imap4.IllegalMailboxEncoding("encoding"),
            b"001", b"NO Illegal mailbox name: encoding\r\n",
        )

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