def test_fetchBodyStructure(self, uid=0):
        """
        L{IMAP4Client.fetchBodyStructure} issues a I{FETCH BODYSTRUCTURE}
        command and returns a Deferred which fires with a structure giving the
        result of parsing the server's response.  The structure is a list
        reflecting the parenthesized data sent by the server, as described by
        RFC 3501, section 7.4.2.
        """
        self.function = self.client.fetchBodyStructure
        self.messages = '3:9,10:*'
        self.msgObjs = [FakeyMessage({
                'content-type': 'text/plain; name=thing; key="value"',
                'content-id': 'this-is-the-content-id',
                'content-description': 'describing-the-content-goes-here!',
                'content-transfer-encoding': '8BIT',
                'content-md5': 'abcdef123456',
                'content-disposition': 'attachment; filename=monkeys',
                'content-language': 'es',
                'content-location': 'http://example.com/monkeys',
            }, (), '', b'Body\nText\nGoes\nHere\n', 919293, None)]
        self.expected = {0: {'BODYSTRUCTURE': [
            'text', 'plain', ['key', 'value', 'name', 'thing'],
            'this-is-the-content-id', 'describing-the-content-goes-here!',
            '8BIT', '20', '4', 'abcdef123456',
            ['attachment', ['filename', 'monkeys']], 'es',
             'http://example.com/monkeys']}}
        return self._fetchWork(uid)

        L{IMAP4Client.fetchBodyStructure} issues a I{FETCH BODYSTRUCTURE}
        command and returns a Deferred which fires with a structure giving the
        result of parsing the server's response.  The structure is a list
        reflecting the parenthesized data sent by the server, as described by
        RFC 3501, section 7.4.2.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py