def test_fetchSpecificHeader(self):
        """
        L{IMAP4Client.fetchSpecific}, when passed C{'HEADER'} for
        C{headerType}, sends the I{BODY[HEADER]} command.  It returns
        a L{Deferred} which fires with a C{dict} mapping message
        sequence numbers to C{list}s of corresponding message data
        given by the server's response.
        """
        d = self.client.fetchSpecific('11', headerType='HEADER')
        self.assertEqual(
            self.transport.value(), b'0001 FETCH 11 BODY[HEADER]\r\n')
        self.client.lineReceived(
            b'* 11 FETCH (BODY[HEADER]'
            b' "From: someone@localhost\r\nSubject: Some subject")')
        self.client.lineReceived(b'0001 OK FETCH completed')
        self.assertEqual(
            self.successResultOf(d),
            {11: [['BODY', ['HEADER'],
                  "From: someone@localhost\r\nSubject: Some subject"]]})

        L{IMAP4Client.fetchSpecific}, when passed C{'HEADER'} for
        C{headerType}, sends the I{BODY[HEADER]} command.  It returns
        a L{Deferred} which fires with a C{dict} mapping message
        sequence numbers to C{list}s of corresponding message data
        given by the server's response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py