[Zope-Checkins] CVS: Zope3/lib/python/Persistence/tests - testPersistence.py:1.3
Jeremy Hylton
jeremy@zope.com
Fri, 21 Jun 2002 18:40:15 -0400
Update of /cvs-repository/Zope3/lib/python/Persistence/tests
In directory cvs.zope.org:/tmp/cvs-serv13614/tests
Modified Files:
testPersistence.py
Log Message:
Expose an explicit method for unghostification _p_activate().
=== Zope3/lib/python/Persistence/tests/testPersistence.py 1.2 => 1.3 ===
self.assertEqual(dm.called, 1)
+ def testActivate(self):
+ p = self.klass()
+ dm = DM()
+ p._p_oid = 1
+ p._p_jar = dm
+ p._p_changed = 0
+ p._p_deactivate()
+ # XXX does this really test the activate method?
+ p._p_activate()
+ self.assertEqual(p.x, 42)
+
def testInterface(self):
self.assert_(IPersistent.isImplementedByInstancesOf(Persistent),
"%s does not implement IPersistent" % Persistent)