'Test URL query parsing with multiple values (AND)'

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

    s3db = current.s3db
    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    project_project = s3db.project_project
    org_organisation = s3db.org_organisation
    project_task_project = s3db.project_task_project
    project_task = s3db.project_task
    url_query = {'project.organisation_id$name__like': ['Test*', 'Other*']}
    resource = current.s3db.resource('project_project', vars=url_query)
    rfilter = resource.rfilter
    joins = rfilter.get_joins(left=True)
    assertTrue(isinstance(joins, list))
    expected = org_organisation.on((project_project.organisation_id == org_organisation.id))
    assertEqual(joins[0], str(expected))
    query = rfilter.get_query()
    expected = (((project_project.deleted != True) & (project_project.id > 0)) & (org_organisation.name.lower().like('other%') & org_organisation.name.lower().like('test%')))
    assertEqual(str(query), str(expected))
