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

        assertEqual = self.assertEqual
        assertTrue = self.assertTrue

        resource = current.s3db.resource("project_project")
        component = resource.components["task"]

        rtable = resource.table
        ltable = component.link.table
        ctable = component.table

        expected_l = ltable.on((ltable.project_id == rtable.id) &
                               (ltable.deleted != True))
        expected_r = ctable.on(ltable.task_id == ctable.id)

        ljoin = component.get_left_join()
        assertTrue(isinstance(ljoin, list))
        assertEqual(len(ljoin), 2)
        assertEqual(str(ljoin[0]), str(expected_l))
        assertEqual(str(ljoin[1]), str(expected_r))

# =============================================================================
Lock and download the translations file.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3resource.py/ComponentLeftJoinConstructionTests.testGetLeftJoinLinkTableComponent--crossover with--dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/views.py/lock_and_get_translation_file