diff -r e2d5b0712974 -r fa00fc251d57 server/test/data/schema.py --- a/server/test/data/schema.py Mon Mar 10 16:07:41 2014 +0100 +++ b/server/test/data/schema.py Mon Mar 10 15:17:50 2014 +0100 @@ -22,6 +22,7 @@ from yams.constraints import SizeConstraint from cubicweb.schema import (WorkflowableEntityType, RQLConstraint, RQLUniqueConstraint, + RQLVocabularyConstraint, ERQLExpression, RRQLExpression) class Affaire(WorkflowableEntityType): @@ -151,6 +152,8 @@ } subject = 'Personne' object = 'Societe' + constraints = [RQLVocabularyConstraint('S owned_by U'), + RQLVocabularyConstraint('S created_by U')] class comments(RelationDefinition): subject = 'Comment' @@ -189,6 +192,10 @@ class evaluee(RelationDefinition): subject = ('Personne', 'CWUser', 'Societe') object = ('Note') + constraints = [ + RQLVocabularyConstraint('S created_by U'), + RQLVocabularyConstraint('S owned_by U'), + ] class ecrit_par(RelationType): inlined = True