[Checkins] SVN: zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py Use lstrip instead of string index.
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Sun Mar 13 15:22:49 EDT 2011
Log message for revision 120892:
Use lstrip instead of string index.
Changed:
U zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py
-=-
Modified: zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py
===================================================================
--- zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py 2011-03-13 15:33:54 UTC (rev 120891)
+++ zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py 2011-03-13 19:22:48 UTC (rev 120892)
@@ -142,12 +142,10 @@
def http(string, handle_errors=True):
+ # Existing tests fail without this. They are a bit sloppy and have
+ # a leading \n which WebOb rejects.
+ string = string.lstrip()
- if string.startswith('\n'):
- # zope.app.publication tests fail without this. They are a bit
- # sloppy and have a leadin \n which WebOb rejects.
- string = string[1:]
-
app = zope.testbrowser.wsgi.Layer.get_app()
if app is None:
raise NotInBrowserLayer(NotInBrowserLayer.__doc__)
More information about the checkins
mailing list