[Checkins] SVN: zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py Get zope.app.publication tests to pass with the new zope.app.wsgi

Brian Sutherland jinty at web.de
Thu Mar 10 10:13:48 EST 2011


Log message for revision 120849:
  Get zope.app.publication tests to pass with the new zope.app.wsgi

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-10 15:00:06 UTC (rev 120848)
+++ zope.app.wsgi/branches/janjaapdriessen-webtest/src/zope/app/wsgi/testlayer.py	2011-03-10 15:13:48 UTC (rev 120849)
@@ -143,6 +143,11 @@
 
 def http(string, handle_errors=True):
 
+    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