def test_rfc822Message(self):
        """
        For a I{message/rfc822} message, the common basic fields are followed
        by information about the contained message.
        """
        body = b'hello, world\nhow are you?\ngoodbye\n'
        major = 'text'
        minor = 'jpeg'
        charset = 'us-ascii'
        identifier = 'some kind of id'
        description = 'great justice'
        encoding = 'maximum'
        msg = FakeyMessage({
                'content-type': major + '/' + minor +
                                 '; charset=' + charset + '; x=y',
                'from': 'Alice <alice@example.com>',
                'to': 'Bob <bob@example.com>',
                'content-id': identifier,
                'content-description': description,
                'content-transfer-encoding': encoding,
                }, (), '', body, 123, None)

        container = FakeyMessage({
                'content-type': 'message/rfc822',
                }, (), b'', b'', 123, [msg])

        structure = imap4.getBodyStructure(container)
        self.assertEqual(
            ['message', 'rfc822', None, None, None, None, 0,
             imap4.getEnvelope(msg), imap4.getBodyStructure(msg), 3],
            structure)

        For a I{message/rfc822} message, the common basic fields are followed
        by information about the contained message.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py