dabo Commit
Revision 3202
Date: 2007-06-22 12:36:45 -0700 (Fri, 22 Jun 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3202
Changed:
U trunk/dabo/biz/test/test_dBizobj.py
Log:
Added a test for John and Larry's case, which proves that Dabo isn't doing this
correctly. The test requeries bizMain() to 0 records, but bizChild still has
its original 2 records.
Diff:
Modified: trunk/dabo/biz/test/test_dBizobj.py
===================================================================
--- trunk/dabo/biz/test/test_dBizobj.py 2007-06-22 18:11:02 UTC (rev 3201)
+++ trunk/dabo/biz/test/test_dBizobj.py 2007-06-22 19:36:45 UTC (rev 3202)
@@ -430,6 +430,24 @@
self.assertEqual(bizChild.RowCount, 2)
+ def testChildren_clearParent(self):
+ """Requerying bizMain to 0 records should remove bizChild's
records, too."""
+ bizMain = self.biz
+ bizChild = dabo.biz.dBizobj(self.con)
+ bizChild.UserSQL = "select * from %s" %
self.temp_child_table_name
+ bizChild.KeyField = "pk"
+ bizChild.DataSource = self.temp_child_table_name
+ bizChild.LinkField = "parent_fk"
+ bizChild.FillLinkFromParent = True
+
+ bizMain.addChild(bizChild)
+ bizMain.requery()
+
+ bizMain.UserSQL = "select * from %s where 1=0" %
self.temp_table_name
+ bizMain.requery()
+ self.assertEqual(bizMain.RowCount, 0)
+ self.assertEqual(bizChild.RowCount, 0)
+
def testNullRecord(self):
biz = self.biz
self.createNullRecord()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]