'Test value extraction from rows by S3ResourceFields'

def testResourceFieldExtract(self):

    assertEqual = self.assertEqual
    s3db = current.s3db
    resource = s3db.resource('org_organisation', uid='DATESTORG')
    rows = resource.select(['name', 'office.name'], limit=1, as_rows=True)
    assertEqual(len(rows), 2)
    row = rows[0]
    rf = S3ResourceField(resource, 'name')
    value = rf.extract(row)
    assertEqual(value, 'DATestOrg')
    rf = S3ResourceField(resource, 'office.name')
    value = rf.extract(row)
    assertEqual(value[:(-1)], 'DATestOffice')
