'Resolution of a selector for a field in a component'

def testResolveSelectorComponentField(self):

    assertEqual = self.assertEqual
    assertNotEqual = self.assertNotEqual
    assertTrue = self.assertTrue
    s3db = current.s3db
    pr_identity = s3db.pr_identity
    pr_person = s3db.pr_person
    resource = s3db.resource('pr_person')
    selector = 'identity.value'
    f = S3ResourceField(resource, selector)
    assertNotEqual(f, None)
    assertEqual(f.selector, selector)
    assertEqual(str(f.field), 'pr_identity.value')
    assertEqual(str(f.tname), 'pr_identity')
    assertEqual(str(f.fname), 'value')
    assertEqual(str(f.colname), 'pr_identity.value')
    assertTrue(isinstance(f.left['pr_identity'], list))
    assertEqual(len(f.left['pr_identity']), 1)
    expected = pr_identity.on(((pr_identity.person_id == pr_person.id) & (pr_identity.deleted != True)))
    assertEqual(str(f.left['pr_identity'][0]), str(expected))
    expected = ((pr_identity.person_id == pr_person.id) & (pr_identity.deleted != True))
    assertEqual(str(f.join['pr_identity']), str(expected))
    assertTrue(f.distinct)
