[Testbot] Plone 5.0 - Python 2.7 - Build # 2020 - Still failing! - 2 failure(s)
jenkins at plone.org
jenkins at plone.org
Sat Mar 22 20:59:21 UTC 2014
-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 2020 - Still Failing!
-------------------------------------------------------------------------------
http://jenkins.plone.org/job/plone-5.0-python-2.7/2020/
-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------
Repository: Products.CMFPlone
Branch: refs/heads/master
Date: 2014-03-22T12:24:59-07:00
Author: David Glick (davisagli) <david at glicksoftware.com>
Commit: https://github.com/plone/Products.CMFPlone/commit/3a564eaa9dcb85ee54407c314933b976d7bbe771
fix browser default tests: disable CSRF transform rather than try to normalize output
Files changed:
M Products/CMFPlone/tests/testBrowserDefault.py
diff --git a/Products/CMFPlone/tests/testBrowserDefault.py b/Products/CMFPlone/tests/testBrowserDefault.py
index 3afbccf..155ba51 100644
--- a/Products/CMFPlone/tests/testBrowserDefault.py
+++ b/Products/CMFPlone/tests/testBrowserDefault.py
@@ -15,12 +15,11 @@
import re
import transaction
import unittest2 as unittest
-from lxml.html import fromstring, tostring
RE_REMOVE_DOCCONT = re.compile('\s*href="http://.*?#content"')
RE_REMOVE_SKIPNAV = re.compile('\s*href="http://.*?#portal-globalnav"')
RE_REMOVE_TABS = re.compile('<ul id="portal-globalnav".*?</ul>', re.S)
-RE_REMOVE_AUTH = re.compile('_authenticator=[\d\w]+', re.S)
+RE_REMOVE_AUTH = re.compile('\_authenticator\=.*?\"', re.S)
class TestPloneToolBrowserDefault(unittest.TestCase):
@@ -41,6 +40,10 @@ def setUp(self):
'plone.app.theming.interfaces.IThemeSettings.enabled'
] = False
+ # disable auto-CSRF
+ from plone.protect import auto
+ auto.CSRF_DISABLED = True
+
_createObjectByType('Folder', self.portal, 'folder')
_createObjectByType('Document', self.portal, 'document')
_createObjectByType('File', self.portal, 'file')
@@ -56,6 +59,10 @@ def setUp(self):
)
)
+ def tearDown(self):
+ from plone.protect import auto
+ auto.CSRF_DISABLED = False
+
def compareLayoutVsView(self, obj, path="", viewaction=None):
if viewaction is None:
if hasattr(aq_base(obj), 'getLayout'):
@@ -85,14 +92,9 @@ def compareLayoutVsView(self, obj, path="", viewaction=None):
if not body:
self.fail('No body in response')
- # normalize html
- body = tostring(fromstring(body))
- resolved = tostring(fromstring(resolved))
if not body == resolved:
- diff = difflib.unified_diff(
- [l.strip() for l in body.split("\n")],
- [l.strip() for l in resolved.split("\n")]
- )
+ diff = difflib.unified_diff(body.split("\n"),
+ resolved.split("\n"))
self.fail("\n".join([line for line in diff]))
def compareLayoutVsCall(self, obj):
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2592 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140322/fb472ef5/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 164632 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140322/fb472ef5/attachment-0003.obj>
More information about the Testbot
mailing list