server/test/unittest_multisources.py
changeset 7650 278fe9c1f3ad
parent 7631 4ac19f288149
child 7771 59ddc2dbe7e0
--- a/server/test/unittest_multisources.py	Tue Jul 12 10:36:22 2011 +0200
+++ b/server/test/unittest_multisources.py	Tue Jul 12 11:27:42 2011 +0200
@@ -381,6 +381,13 @@
     def test_nonregr3(self):
         self.sexecute('DELETE Card X WHERE X eid %(x)s, NOT X multisource_inlined_rel Y', {'x': self.ic1})
 
+    def test_delete_source(self):
+        req = self.request()
+        req.execute('DELETE CWSource S WHERE S name "extern"')
+        self.commit()
+        cu = self.session.system_sql("SELECT * FROM entities WHERE source='extern'")
+        self.failIf(cu.fetchall())
+
 if __name__ == '__main__':
     from logilab.common.testlib import unittest_main
     unittest_main()