[Zope-Checkins] CVS: Zope/lib/python/Products/Sessions/tests - testSessionDataManager.py:1.12
Chris McDonough
chrism@zope.com
Mon, 24 Jun 2002 15:30:48 -0400
Update of /cvs-repository/Zope/lib/python/Products/Sessions/tests
In directory cvs.zope.org:/tmp/cvs-serv1991/tests
Modified Files:
testSessionDataManager.py
Log Message:
Changed transient object invalidate() method to search acquisition
chain for its transient object container.
Changed session data manager to splice itself into the transient
object container's acquisition path before returning a session
data object via getSessionData.
Updated unit tests to reflect changes.
=== Zope/lib/python/Products/Sessions/tests/testSessionDataManager.py 1.11 => 1.12 ===
assert self.app.session_data_manager.hasSessionData()
- def testSessionDataWrappedInSDM(self):
+ def testSessionDataWrappedInSDMandTOC(self):
sd = self.app.session_data_manager.getSessionData(1)
assert aq_base(sd.aq_parent) is \
- aq_base(self.app.session_data_manager), sd.aq_parent
+ aq_base(getattr(self.app, 'session_data_manager')), sd.aq_parent
+ assert aq_base(sd.aq_parent.aq_parent) is \
+ aq_base(getattr(self.app.temp_folder, toc_name)), \
+ sd.aq_parent.aq_parent
def testNewSessionDataObjectIsValid(self):
sdType = type(TransientObject(1))
@@ -138,12 +141,6 @@
assert type(getattr(sd, 'aq_base', sd)) is sdType
assert not hasattr(sd, '_invalid')
- def testInvalidateSessionDataObject(self):
- sd = self.app.session_data_manager.getSessionData()
- sd.invalidate()
- assert hasattr(sd, '_invalid')
- assert not sd.isValid()
-
def testBrowserIdIsSet(self):
sd = self.app.session_data_manager.getSessionData()
mgr = getattr(self.app, idmgr_name)