--- a/server/test/unittest_msplanner.py Thu Sep 29 12:55:28 2011 +0200
+++ b/server/test/unittest_msplanner.py Thu Sep 29 13:53:34 2011 +0200
@@ -1806,15 +1806,19 @@
def test_delete_relation3(self):
repo._type_source_cache[999999] = ('Note', 'cards', 999999, 'cards')
- 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'})
+ self.assertRaises(
+ BadRQLQuery, self._test,
+ 'DELETE Y multisource_inlined_rel X WHERE X eid %(x)s, '
+ 'NOT (Y cw_source S, S name %(source)s)', [],
+ {'x': 999999, 'source': 'cards'})
+
+ def test_delete_relation4(self):
+ repo._type_source_cache[999999] = ('Note', 'cards', 999999, 'cards')
+ self.assertRaises(
+ BadRQLQuery, self._test,
+ 'DELETE X multisource_inlined_rel Y WHERE Y is Note, X eid %(x)s, '
+ 'NOT (Y cw_source S, S name %(source)s)', [],
+ {'x': 999999, 'source': 'cards'})
def test_delete_entity1(self):
repo._type_source_cache[999999] = ('Note', 'system', 999999, 'system')