Error fetchSpecific an HTML body part

[email protected] Mon, 05 Oct 2009 13:47:49 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from biny <[email protected]>:

New test for twisted.mail.test.test_imap.IMAP4ClientFetchTests:

{{{
    def test_fetchSpecificHTML(self):
        d = self.client.fetchSpecific('7')
        self.assertEquals(
            self.transport.value(), '0001 FETCH 7 BODY[]\r\n')
        self.client.lineReceived('* 7 FETCH (BODY[] "<html>test</html>")')
        self.client.lineReceived('0001 OK FETCH completed')
        self.assertEquals(
            self._extractDeferredResult(d), {7: [['BODY', [], "<html>test</html>"]]})
}}}

{{{
[ERROR]: twisted.mail.test.test_imap.IMAP4ClientFetchTests.test_fetchSpecificHTML

Traceback (most recent call last):
  File "/home/biny/packages/repositories/twisted/twisted/mail/imap4.py", line 3419, in _cbFetch
    mapping = self._parseFetchPairs(values[0])
  File "/home/biny/packages/repositories/twisted/twisted/mail/imap4.py", line 3401, in _parseFetchPairs
    "Not enough arguments", fetchResponseList)
twisted.mail.imap4.IllegalServerResponse: ('Not enough arguments', ['BODY', [], '<html>test</html>'])
}}}


----------
Type     : defect
Component: mail
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4049