server/test/data/schema.py
changeset 9635 aaf099172bb9
parent 9452 5308b3fe03c9
parent 9600 bde625698f44
child 9832 17abdb7af3e6
--- a/server/test/data/schema.py	Mon Apr 07 14:15:35 2014 +0200
+++ b/server/test/data/schema.py	Mon Apr 07 17:02:04 2014 +0200
@@ -22,6 +22,7 @@
 from yams.constraints import SizeConstraint
 from cubicweb.schema import (WorkflowableEntityType,
                              RQLConstraint, RQLUniqueConstraint,
+                             RQLVocabularyConstraint,
                              ERQLExpression, RRQLExpression)
 
 class Affaire(WorkflowableEntityType):
@@ -157,6 +158,8 @@
         }
     subject = 'Personne'
     object = 'Societe'
+    constraints = [RQLVocabularyConstraint('S owned_by U'),
+                   RQLVocabularyConstraint('S created_by U')]
 
 class comments(RelationDefinition):
     subject = 'Comment'
@@ -187,6 +190,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