[Zope-Checkins] CVS: Zope3/lib/python/Persistence/tests - testPersistence.py:1.1.2.2
Jim Fulton
jim@zope.com
Sun, 25 Nov 2001 19:25:02 -0500
Update of /cvs-repository/Zope3/lib/python/Persistence/tests
In directory cvs.zope.org:/tmp/cvs-serv15670/tests
Modified Files:
Tag: Zope-3x-branch
testPersistence.py
Log Message:
Fixed bug: setting _p_changed directly did not register object
=== Zope3/lib/python/Persistence/tests/testPersistence.py 1.1.2.1 => 1.1.2.2 ===
self.assertEqual(p.__getstate__(), {'x': 5})
self.assertEqual(p._p_changed, 0)
-
+
+ def testDirectChanged(self):
+ p=P()
+ p._p_oid=1
+ dm=DM()
+ p._p_jar=dm
+ self.assertEqual(p._p_changed, 0)
+ self.assertEqual(dm.called, 0)
+ p._p_changed=1
+ self.assertEqual(dm.called, 1)
from Persistence import Persistent