dabo Commit
Revision 5604
Date: 2010-01-26 15:31:46 -0800 (Tue, 26 Jan 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5604
Changed:
U trunk/dabo/biz/test/test_dBizobj.py
Log:
Added a test case to try to prove ticket #1312, but I must be missing something.
Diff:
Modified: trunk/dabo/biz/test/test_dBizobj.py
===================================================================
--- trunk/dabo/biz/test/test_dBizobj.py 2010-01-26 21:51:05 UTC (rev 5603)
+++ trunk/dabo/biz/test/test_dBizobj.py 2010-01-26 23:31:46 UTC (rev 5604)
@@ -243,6 +243,28 @@
self.assertEqual(biz.RowNumber, 0)
+ def testDeleteChildThenDeleteParent(self):
+ """See ticket #1312"""
+ bizMain = self.biz
+ bizChild = dabo.biz.dBizobj(self.con)
+ bizChild.KeyField = "pk"
+ bizChild.DataSource = self.temp_child_table_name
+ bizChild.LinkField = "parent_fk"
+ bizChild.FillLinkFromParent = True
+
+ bizMain.addChild(bizChild)
+ bizMain.requery()
+
+ # bizMain is on row 0, id 1. bizChild is on row 0 with 2 rows.
+ self.assertEqual(bizMain.Record.pk, 1)
+ self.assertEqual(bizChild.RowCount, 2)
+ self.assertEqual(bizChild.RowNumber, 0)
+ self.assertEqual(bizChild.Record.parent_fk, 1)
+ bizChild.delete()
+ bizMain.delete()
+ self.assertEqual(bizChild.RowCount, 0)
+ self.assertEqual(bizMain.RowCount, 2)
+
def testMementos(self):
biz = self.biz
cur = biz._CurrentCursor
_______________________________________________
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/[email protected]