'Join for a link-table component'

@unittest.skipIf((not current.deployment_settings.has_module('project')), 'project    module    disabled')
def testGetJoinLinkTableComponent(self):

    resource = current.s3db.resource('project_project')
    component = resource.components['task']
    project_project = resource.table
    project_task_project = component.link.table
    project_task = component.table
    expected = (((project_task_project.project_id == project_project.id) & (project_task_project.deleted != True)) & (project_task_project.task_id == project_task.id))
    join = component.get_join()
    self.assertEqual(str(join), str(expected))
