[SQL-CVS] r188 - trunk/SQLObject/tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-08-18 06:37:32
|
Author: ianb Date: 2004-08-17 22:28:48 -0400 (Tue, 17 Aug 2004) New Revision: 188 Modified: trunk/SQLObject/tests/test.py Log: Test to look at SF 956839: destroySelf() doesn't work if cache=3DFalse Modified: trunk/SQLObject/tests/test.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/tests/test.py 2004-08-18 02:20:49 UTC (rev 187) +++ trunk/SQLObject/tests/test.py 2004-08-18 02:28:48 UTC (rev 188) @@ -22,6 +22,7 @@ from mx import DateTime global curr_db curr_db =3D None +from sqlobject import cache =20 ######################################## ## Basic operation @@ -394,7 +395,29 @@ obj.destroySelf() self.assertEqual(list(TestSO1.select('all')), []) =20 +######################################## +## Delete without caching +######################################## =20 +class NoCache(SQLObject): + name =3D StringCol() + +class TestNoCache(SQLObjectTest): + + classes=3D[NoCache] + + def setUp(self): + SQLObjectTest.setUp(self) + NoCache._connection.cache =3D cache.CacheSet(cache=3DFalse) + + def tearDown(self): + NoCache._connection.cache =3D cache.CacheSet(cache=3DTrue) + SQLObjectTest.tearDown(self) + + def testDestroySelf(self): + value =3D NoCache(name=3D'test') + value.destroySelf() + ######################################## ## Transaction test ######################################## |