'Text XML output with max bounds'

def testExportTreeWithMaxBounds(self):

    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    xml = current.xml
    auth = current.auth
    auth.override = True
    xmlstr = '\n<s3xml>\n                <resource    name="org_organisation">\n                                <data    field="name">TestExportTreeOrganisation2</data>\n                                <resource    name="org_office"    uuid="ETO2">\n                                                <data    field="name">TestExportTreeOffice2</data>\n                                </resource>\n                </resource>\n</s3xml>'
    try:
        xmltree = etree.ElementTree(etree.fromstring(xmlstr))
        resource = current.s3db.resource('org_organisation')
        resource.import_xml(xmltree)
        resource = current.s3db.resource('org_office', uid='ETO2')
        tree = resource.export_tree(start=0, limit=1, dereference=False, maxbounds=True)
        root = tree.getroot()
        attrib = root.attrib
        assertEqual(len(attrib), 9)
        assertTrue(('latmin' in attrib))
        assertTrue(('latmax' in attrib))
        assertTrue(('lonmin' in attrib))
        assertTrue(('lonmax' in attrib))
    finally:
        current.db.rollback()
        auth.override = False
