def test_singlePart(self):
        """
        L{imap4.getBodyStructure} accepts a L{IMessagePart} provider and returns
        a list giving the basic fields for the I{BODY} response for that
        message.
        """
        body = b'hello, world'
        major = 'image'
        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',
                'content-id': identifier,
                'content-description': description,
                'content-transfer-encoding': encoding,
                }, (), b'', body, 123, None)
        structure = imap4.getBodyStructure(msg)
        self.assertEqual(
            [major, minor, ["charset", charset, 'x', 'y'], identifier,
             description, encoding, len(body)],
            structure)

        L{imap4.getBodyStructure} accepts a L{IMessagePart} provider and returns
        a list giving the basic fields for the I{BODY} response for that
        message.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py