test/data/entities.py
author sylvain.thenault@logilab.fr
Fri, 24 Apr 2009 15:38:11 +0200
branchtls-sprint
changeset 1473 717dea3362c0
parent 744 4da6e0f4df2a
child 1977 606923dff11b
permissions -rw-r--r--
more implements selector tests

from cubicweb.entities import AnyEntity, fetch_config

class Societe(AnyEntity):
    id = 'Societe'
    fetch_attrs = ('nom',)

class Personne(Societe):
    """customized class forne Person entities"""
    id = 'Personne'
    fetch_attrs, fetch_order = fetch_config(['nom', 'prenom'])
    rest_attr = 'nom'


class Note(AnyEntity):
    id = 'Note'