[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/publication/tests/test_zopepublication.py
Some test cleanups.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Apr 12 16:31:17 EDT 2005
Log message for revision 29954:
Some test cleanups.
Changed:
U Zope3/trunk/src/zope/app/publication/tests/test_zopepublication.py
-=-
Modified: Zope3/trunk/src/zope/app/publication/tests/test_zopepublication.py
===================================================================
--- Zope3/trunk/src/zope/app/publication/tests/test_zopepublication.py 2005-04-12 18:55:41 UTC (rev 29953)
+++ Zope3/trunk/src/zope/app/publication/tests/test_zopepublication.py 2005-04-12 20:31:17 UTC (rev 29954)
@@ -34,6 +34,7 @@
from zope.publisher.browser import BrowserResponse
from zope.security import simplepolicies
from zope.security.management import setSecurityPolicy, queryInteraction
+from zope.security.management import endInteraction
from zope.app import zapi
from zope.app.testing.placelesssetup import PlacelessSetup
@@ -141,7 +142,6 @@
self.publication = ZopePublication(self.db)
def tearDown(self):
- setSecurityPolicy(self.policy) # XXX still needed?
super(BasePublicationTests, self).tearDown()
def testInterfacesVerify(self):
@@ -397,23 +397,23 @@
f1['f2'] = Folder()
sm1 = setup.createSiteManager(f1)
setup.addUtility(sm1, '', IAuthenticationUtility, AuthUtility1())
-
+
f2 = f1['f2']
sm2 = setup.createSiteManager(f2)
setup.addUtility(sm2, '', IAuthenticationUtility, AuthUtility2())
transaction.commit()
-
-
+
+
from zope.app.container.interfaces import ISimpleReadContainer
from zope.app.container.traversal import ContainerTraverser
-
+
ztapi.provideView(ISimpleReadContainer, IRequest, IPublishTraverse,
'', ContainerTraverser)
-
+
from zope.app.folder.interfaces import IFolder
from zope.security.checker import defineChecker, InterfaceChecker
defineChecker(Folder, InterfaceChecker(IFolder))
-
+
self.publication.beforeTraversal(self.request)
self.assertEqual(list(queryInteraction().participations),
[self.request])
More information about the Zope3-Checkins
mailing list