def test_textPart(self):
        """
        For a I{text/*} message, the number of lines in the message body are
        included after the common single-part basic fields.
        """
        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',
                '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), len(body.splitlines())],
            structure)

        For a I{text/*} message, the number of lines in the message body are
        included after the common single-part basic fields.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py