[Modeling-cvs] ProjectModeling/Modeling/tests test_EditingContext_Global.py,1.39,1.40
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-08-09 15:07:26
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv17578 Modified Files: test_EditingContext_Global.py Log Message: Added tests for bug #785913; fixed test_21_snapshot_raw(), now works even if test_10_saveChanges_04() fails prematurely Index: test_EditingContext_Global.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** test_EditingContext_Global.py 3 Aug 2003 10:12:26 -0000 1.39 --- test_EditingContext_Global.py 9 Aug 2003 15:07:23 -0000 1.40 *************** *** 1045,1050 **** # saved objects, related to other saved objects ! raw_fdard=ec.fetch('Writer', 'age == 82', rawRows=1)[0] ! fdard=ec.fetch('Writer', 'age == 82')[0] rabelais=ec.fetch('Writer', 'lastName == "Rabelais"')[0] fdard_snapshot_raw=fdard.snapshot_raw() --- 1045,1050 ---- # saved objects, related to other saved objects ! raw_fdard=ec.fetch('Writer', 'age in [81, 82]', rawRows=1)[0] ! fdard=ec.fetch('Writer', 'age in [81, 82]')[0] rabelais=ec.fetch('Writer', 'lastName == "Rabelais"')[0] fdard_snapshot_raw=fdard.snapshot_raw() *************** *** 1209,1212 **** --- 1209,1227 ---- self.assertEqual(ws, 2) + def test_26_fetch_underscore_percent(self): + "[EditingContext] fetch real '_' and '%'" + # bug #785913 + ec=EditingContext() + b1=Book(); b1.setTitle('abc_d') + b2=Book(); b2.setTitle('abcXd') + b3=Book(); b3.setTitle('abc%d') + ec.insert(b1); ec.insert(b2); ec.insert(b3) + ec.saveChanges() + + res=ec.fetch('Book', 'title like "*abc_d*"') + self.assertEqual(len(res), 1) + res=ec.fetch('Book', 'title like "*abc%d*"') + self.assertEqual(len(res), 1) + def test_999_customSQLQuery(self): "[EditingContext] custom SQL Query" |