'Test export of a resource that has components from the same table but different aliases'

@unittest.skip('disabled    until    fixed')
@unittest.skipIf((not current.deployment_settings.has_module('org')), 'org    module    disabled')
def testExportTreeWithComponentAlias(self):

    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    current.auth.override = True
    s3db = current.s3db
    s3db.add_components('org_organisation', org_office=({'name': 'fieldoffice', 'joinby': 'organisation_id', 'filterby': {'office_type_id': 5}}, {'name': 'hq', 'joinby': 'organisation_id', 'filterby': {'office_type_id': 4}}))
    resource = s3db.resource('org_organisation')
    assertEqual(str(resource.components.fieldoffice.filter), '(org_fieldoffice_office.office_type_id    =    5)')
    assertEqual(str(resource.components.hq.filter), '(org_hq_office.office_type_id    =    4)')
    tree = resource.export_tree(mcomponents=['fieldoffice', 'hq'])
    assertTrue((resource.components.fieldoffice._length > 0))
    assertTrue((resource.components.hq._length > 0))
    assertTrue((resource.components.office._length is None))
    tree = resource.export_tree(mcomponents=['office', 'fieldoffice', 'hq'])
    assertTrue((resource.components.office._length > 0))
    assertTrue((resource.components.fieldoffice._length is None))
    assertTrue((resource.components.hq._length is None))
