'Test whether S3ResourceQueries work with lazy virtual fields'

def testLazyVirtualFieldsFilter(self):

    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    resource = current.s3db.resource('pr_person')
    from s3 import FS
    query = FS('name').like('Admin%')
    resource.add_filter(query)
    data = resource.select(['name', 'first_name', 'last_name'], limit=None)
    rows = data['rows']
    for item in rows:
        assertTrue(('pr_person.name' in item))
        assertEqual(item['pr_person.name'][:5], 'Admin')
        assertEqual(item['pr_person.name'], ('%s    %s' % (item['pr_person.first_name'], item['pr_person.last_name'])))
