server/test/unittest_msplanner.py
branchstable
changeset 6673 5eb2f1f2c277
parent 6654 18d159a2d1ba
child 6676 39763487ba33
equal deleted inserted replaced
6672:2008fd2f628c 6673:5eb2f1f2c277
  1707                          None, None, [self.system], {'Y': 'table0.C0'}, []),
  1707                          None, None, [self.system], {'Y': 'table0.C0'}, []),
  1708                         ]),
  1708                         ]),
  1709                     ],
  1709                     ],
  1710                    {'x': ueid, 'y': ueid})
  1710                    {'x': ueid, 'y': ueid})
  1711 
  1711 
       
  1712     def test_delete_relation3(self):
       
  1713         repo._type_source_cache[999999] = ('Note', 'cards', 999999)
       
  1714         self._test('DELETE Y multisource_inlined_rel X WHERE X eid %(x)s, NOT (Y cw_source S, S name %(source)s)',
       
  1715                    [('DeleteRelationsStep',
       
  1716                      [('OneFetchStep',
       
  1717                        [('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)',
       
  1718                          [{'S': 'CWSource', 'Y': 'Card'}, {'S': 'CWSource', 'Y': 'Note'}])],
       
  1719                        None, None, [self.system], {},
       
  1720                        [])]
       
  1721                      )],
       
  1722                    {'x': 999999, 'source': 'cards'})
       
  1723 
  1712     def test_delete_entity1(self):
  1724     def test_delete_entity1(self):
  1713         repo._type_source_cache[999999] = ('Note', 'system', 999999)
  1725         repo._type_source_cache[999999] = ('Note', 'system', 999999)
  1714         self._test('DELETE Note X WHERE X eid %(x)s, NOT Y multisource_rel X',
  1726         self._test('DELETE Note X WHERE X eid %(x)s, NOT Y multisource_rel X',
  1715                    [('DeleteEntitiesStep',
  1727                    [('DeleteEntitiesStep',
  1716                      [('OneFetchStep', [('Any 999999 WHERE NOT EXISTS(Y multisource_rel 999999), Y is IN(Card, Note)',
  1728                      [('OneFetchStep', [('Any 999999 WHERE NOT EXISTS(Y multisource_rel 999999), Y is IN(Card, Note)',