'Test ownership for a public record'

def testOwnershipPublicRecord(self):

    auth = current.auth
    s3_impersonate = auth.s3_impersonate
    is_owner = auth.permission.is_owner
    assertTrue = self.assertTrue
    assertFalse = self.assertFalse
    auth.s3_clear_session_ownership()
    table = self.table
    record_id = self.record_id
    s3_impersonate('admin@example.com')
    assertTrue(is_owner(table, record_id))
    s3_impersonate('normaluser@example.com')
    assertTrue(is_owner(table, record_id))
    s3_impersonate(None)
    assertFalse(is_owner(table, record_id))
    auth.s3_make_session_owner(table, record_id)
    assertTrue(is_owner(table, record_id))
