server/test/unittest_msplanner.py
branchstable
changeset 6056 37a37e5ba330
parent 5768 1e73a466aa69
child 6057 cb5c8852cbda
--- a/server/test/unittest_msplanner.py	Mon Aug 02 15:36:44 2010 +0200
+++ b/server/test/unittest_msplanner.py	Tue Aug 03 12:17:01 2010 +0200
@@ -2196,6 +2196,60 @@
                    {'x': 999999})
 
 
+    def test_nonregr_not_is(self):
+        self._test("Any X WHERE X owned_by U, U login 'anon', NOT X is Comment",
+                   [('FetchStep', [('Any X WHERE X is IN(Card, Note, State)',
+                                    [{'X': 'Note'}, {'X': 'State'}, {'X': 'Card'}])],
+                     [self.cards, self.cards2, self.system],
+                     None, {'X': 'table0.C0'}, []),
+                    ('UnionStep', None, None,
+                     [('OneFetchStep',
+                       [(u'Any X WHERE X owned_by U, U login "anon", U is CWUser, X is IN(Affaire, BaseTransition, Basket, Bookmark, CWAttribute, CWCache, CWConstraint, CWConstraintType, CWEType, CWGroup, CWPermission, CWProperty, CWRType, CWRelation, CWUser, Division, Email, EmailAddress, EmailPart, EmailThread, ExternalUri, File, Folder, Personne, RQLExpression, Societe, SubDivision, SubWorkflowExitPoint, Tag, TrInfo, Transition, Workflow, WorkflowTransition)',
+                         [{'U': 'CWUser', 'X': 'Affaire'},
+                          {'U': 'CWUser', 'X': 'BaseTransition'},
+                          {'U': 'CWUser', 'X': 'Basket'},
+                          {'U': 'CWUser', 'X': 'Bookmark'},
+                          {'U': 'CWUser', 'X': 'CWAttribute'},
+                          {'U': 'CWUser', 'X': 'CWCache'},
+                          {'U': 'CWUser', 'X': 'CWConstraint'},
+                          {'U': 'CWUser', 'X': 'CWConstraintType'},
+                          {'U': 'CWUser', 'X': 'CWEType'},
+                          {'U': 'CWUser', 'X': 'CWGroup'},
+                          {'U': 'CWUser', 'X': 'CWPermission'},
+                          {'U': 'CWUser', 'X': 'CWProperty'},
+                          {'U': 'CWUser', 'X': 'CWRType'},
+                          {'U': 'CWUser', 'X': 'CWRelation'},
+                          {'U': 'CWUser', 'X': 'CWUser'},
+                          {'U': 'CWUser', 'X': 'Division'},
+                          {'U': 'CWUser', 'X': 'Email'},
+                          {'U': 'CWUser', 'X': 'EmailAddress'},
+                          {'U': 'CWUser', 'X': 'EmailPart'},
+                          {'U': 'CWUser', 'X': 'EmailThread'},
+                          {'U': 'CWUser', 'X': 'ExternalUri'},
+                          {'U': 'CWUser', 'X': 'File'},
+                          {'U': 'CWUser', 'X': 'Folder'},
+                          {'U': 'CWUser', 'X': 'Personne'},
+                          {'U': 'CWUser', 'X': 'RQLExpression'},
+                          {'U': 'CWUser', 'X': 'Societe'},
+                          {'U': 'CWUser', 'X': 'SubDivision'},
+                          {'U': 'CWUser', 'X': 'SubWorkflowExitPoint'},
+                          {'U': 'CWUser', 'X': 'Tag'},
+                          {'U': 'CWUser', 'X': 'TrInfo'},
+                          {'U': 'CWUser', 'X': 'Transition'},
+                          {'U': 'CWUser', 'X': 'Workflow'},
+                          {'U': 'CWUser', 'X': 'WorkflowTransition'}])],
+                       None, None,
+                       [self.system], {}, []),
+                      ('OneFetchStep',
+                       [(u'Any X WHERE X owned_by U, U login "anon", U is CWUser, X is IN(Card, Note, State)',
+                         [{'U': 'CWUser', 'X': 'Note'},
+                          {'U': 'CWUser', 'X': 'State'},
+                          {'U': 'CWUser', 'X': 'Card'}])],
+                       None, None,
+                       [self.system], {'X': 'table0.C0'}, [])
+                      ])
+                    ])
+
 
 class FakeVCSSource(AbstractSource):
     uri = 'ccc'