server/test/unittest_msplanner.py
branchstable
changeset 6673 5eb2f1f2c277
parent 6654 18d159a2d1ba
child 6676 39763487ba33
--- a/server/test/unittest_msplanner.py	Fri Nov 05 09:14:10 2010 +0100
+++ b/server/test/unittest_msplanner.py	Fri Nov 05 09:17:43 2010 +0100
@@ -1709,6 +1709,18 @@
                     ],
                    {'x': ueid, 'y': ueid})
 
+    def test_delete_relation3(self):
+        repo._type_source_cache[999999] = ('Note', 'cards', 999999)
+        self._test('DELETE Y multisource_inlined_rel X WHERE X eid %(x)s, NOT (Y cw_source S, S name %(source)s)',
+                   [('DeleteRelationsStep',
+                     [('OneFetchStep',
+                       [('Any Y,999999 WHERE Y multisource_inlined_rel 999999, NOT EXISTS(Y cw_source S, S name "cards"), S is CWSource, Y is IN(Card, Note)',
+                         [{'S': 'CWSource', 'Y': 'Card'}, {'S': 'CWSource', 'Y': 'Note'}])],
+                       None, None, [self.system], {},
+                       [])]
+                     )],
+                   {'x': 999999, 'source': 'cards'})
+
     def test_delete_entity1(self):
         repo._type_source_cache[999999] = ('Note', 'system', 999999)
         self._test('DELETE Note X WHERE X eid %(x)s, NOT Y multisource_rel X',