'L{imap4.getBodyStructure} returns a list giving the basic and extended
fields for a I{BODYSTRUCTURE} response if passed C{True} for the
C{extended} parameter.'

def test_singlePartExtended(self):

    body = 'hello,    world'
    major = 'image'
    minor = 'jpeg'
    charset = 'us-ascii'
    identifier = 'some    kind    of    id'
    description = 'great    justice'
    encoding = 'maximum'
    md5 = 'abcdefabcdef'
    msg = FakeyMessage({'content-type': (((((major + '/') + minor) + ';    charset=') + charset) + ';    x=y'), 'content-id': identifier, 'content-description': description, 'content-transfer-encoding': encoding, 'content-md5': md5, 'content-disposition': 'attachment;    name=foo;    size=bar', 'content-language': 'fr', 'content-location': 'France'}, (), '', body, 123, None)
    structure = imap4.getBodyStructure(msg, extended=True)
    self.assertEqual([major, minor, ['charset', charset, 'x', 'y'], identifier, description, encoding, len(body), md5, ['attachment', ['name', 'foo', 'size', 'bar']], 'fr', 'France'], structure)
