[Checkins] SVN: zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer. Add comments about the difference between app and wsgi_stack in TestBrowserMiddleware.
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Fri Nov 12 09:20:38 EST 2010
Log message for revision 118367:
Add comments about the difference between app and wsgi_stack in TestBrowserMiddleware.
Changed:
U zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.py
U zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.txt
-=-
Modified: zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.py
===================================================================
--- zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.py 2010-11-12 14:12:54 UTC (rev 118366)
+++ zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.py 2010-11-12 14:20:37 UTC (rev 118367)
@@ -89,6 +89,9 @@
"""
def __init__(self, app, wsgi_stack, root, handle_errors):
+ # Passing in both an app and a WSGI stack may seem like a duplication
+ # but we want to keep a reference to the app that may be arbitrarily
+ # deep in the WSGI stack.
assert isinstance(handle_errors, bool)
self.app = app
self.root = root
Modified: zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.txt
===================================================================
--- zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.txt 2010-11-12 14:12:54 UTC (rev 118366)
+++ zope.app.wsgi/trunk/src/zope/app/wsgi/testlayer.txt 2010-11-12 14:20:37 UTC (rev 118367)
@@ -11,6 +11,8 @@
... checker.NamesChecker(['browserDefault', '__call__']),
... )
+The `silly middleware` has injected information into the page:
+
>>> from zope.app.wsgi.testlayer import Browser
>>> browser = Browser()
>>> browser.open('http://localhost/index.html')
More information about the checkins
mailing list