server/test/data/schema.py
branchstable
changeset 9565 fa00fc251d57
parent 8820 dbffb6959564
child 9600 bde625698f44
--- 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