[Checkins] SVN: grokcore.view/branches/zca-only/src/grokcore/view/ftests/test_functional.py Added context manager for user
Souheil CHELFOUH
souheil at chelfouh.com
Fri Mar 25 13:39:15 EDT 2011
Log message for revision 121130:
Added context manager for user
Changed:
U grokcore.view/branches/zca-only/src/grokcore/view/ftests/test_functional.py
-=-
Modified: grokcore.view/branches/zca-only/src/grokcore/view/ftests/test_functional.py
===================================================================
--- grokcore.view/branches/zca-only/src/grokcore/view/ftests/test_functional.py 2011-03-25 17:08:12 UTC (rev 121129)
+++ grokcore.view/branches/zca-only/src/grokcore/view/ftests/test_functional.py 2011-03-25 17:39:14 UTC (rev 121130)
@@ -13,12 +13,13 @@
from cromlech.bootstrap.testlayer import ZODBLayer
from cromlech.bootstrap.helper import Bootstrapper
+from cromlech.io.interfaces import IRequest, IPublisher
+
from persistent.interfaces import IPersistent
from pkg_resources import resource_listdir
from zope.component import getMultiAdapter
from zope.event import notify
from zope.lifecycleevent import ObjectCreatedEvent
-from zope.publisher.interfaces import IRequest, IPublication
from zope.publisher.publish import publish
from zope.site.interfaces import IRootFolder
from zope.site.folder import rootFolder
@@ -96,8 +97,9 @@
with Bootstrapper(self.db) as root, app:
with transaction:
user = setUser(self, app, request)
- with Interaction(user) as participation:
- response = publish(request, root=app, handle_errors=False)
+ with Interaction(user) as participation:
+ response = getMultiAdapter(
+ (request, root, )
return response
More information about the checkins
mailing list