[Testbot] Plone 5.0 - Python 2.7 - Build # 3264 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Tue Sep 30 16:40:53 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3264 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3264/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-09-30T17:28:07+02:00
Author: Timo Stollenwerk () <contact at timostollenwerk.net>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/ad1dc3b75fe3b20ffe01466fdbc54161bc5438fd

Revert "some formatting while figuring out whats wrong"

This reverts commit cd786d5e4440a8b051434754317b7345589a8f40.

It seems this commit caused half of the Plone 5 tests not to run. Revert to verify this assumption.

Files changed:
M Products/CMFDiffTool/CMFDiffTool.py
M Products/CMFDiffTool/testing.py
M Products/CMFDiffTool/tests/testChangeSet.py

diff --git a/Products/CMFDiffTool/CMFDiffTool.py b/Products/CMFDiffTool/CMFDiffTool.py
index 1128617..e4875f5 100644
--- a/Products/CMFDiffTool/CMFDiffTool.py
+++ b/Products/CMFDiffTool/CMFDiffTool.py
@@ -3,38 +3,37 @@
 
    Calculate differences between content objects
 """
-from AccessControl import ClassSecurityInfo
+
+from zope.interface import implements
+
 from Acquisition import aq_base
+from AccessControl import ClassSecurityInfo
 from App.class_init import InitializeClass
 from OFS.SimpleItem import SimpleItem
+from zExceptions import BadRequest
+
 from Products.CMFCore.permissions import ManagePortal
-from Products.CMFCore.utils import UniqueObject
 from Products.CMFCore.utils import registerToolInterface
-from Products.CMFDiffTool.ChangeSet import BaseChangeSet
+from Products.CMFCore.utils import UniqueObject
 from Products.CMFDiffTool.interfaces import IDiffTool
+from Products.CMFDiffTool.ChangeSet import BaseChangeSet
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
-from zExceptions import BadRequest
-from zope.interface import implementer
 
 
- at implementer(IDiffTool)
 class CMFDiffTool(UniqueObject, SimpleItem):
-    """CMF Diff Tool"""
+    """ """
 
     id = 'portal_diff'
     meta_type = 'CMF Diff Tool'
 
     security = ClassSecurityInfo()
 
-    security.declareProtected(ManagePortal, 'manage_difftypes')
-    manage_difftypes = PageTemplateFile('zpt/editCMFDiffTool', globals())
+    manage_options = (({'label': 'Configure', 'action': 'manage_difftypes'},
+                      {'label': 'Overview', 'action': 'manage_overview'},
+                      ) + SimpleItem.manage_options
+                    )
 
-    manage_options = (
-        (
-            {'label': 'Configure', 'action': 'manage_difftypes'},
-            {'label': 'Overview', 'action': 'manage_overview'},
-        ) + SimpleItem.manage_options
-    )
+    implements(IDiffTool)
 
     ## Internal attributes
     _difftypes = {}
@@ -42,6 +41,9 @@ class CMFDiffTool(UniqueObject, SimpleItem):
     def __init__(self):
         self._pt_diffs = {}
 
+    security.declareProtected(ManagePortal, 'manage_difftypes')
+    manage_difftypes = PageTemplateFile('zpt/editCMFDiffTool', globals())
+
     def manage_editDiffFields(self, updates, REQUEST=None):
         """Edit the portal type fields"""
 
@@ -56,21 +58,18 @@ def manage_editDiffFields(self, updates, REQUEST=None):
         self._p_changed = 1
 
         if REQUEST:
-            return self.manage_difftypes(
-                manage_tabs_message="Diff mappings updated"
-            )
+            return self.manage_difftypes(manage_tabs_message="Diff mappings updated")
+
+    security.declareProtected(ManagePortal, 'listDiffTypes')
 
-    @security.protected(ManagePortal)
     def manage_addDiffField(self, pt_name, field, diff, REQUEST=None):
         """Add a new diff field from the ZMI"""
         self.setDiffField(pt_name, field, diff)
         if REQUEST:
             return self.manage_difftypes(manage_tabs_message="Field added")
-
-    @security.protected(ManagePortal)
+        
     def setDiffField(self, pt_name, field, diff):
-        """Set the diff type for 'field' on the portal type 'pt_name' to
-        'diff'"""
+        """Set the diff type for 'field' on the portal type 'pt_name' to 'diff'"""
         if pt_name not in self.portal_types.listContentTypes():
             raise BadRequest("Error: invalid portal type")
 
@@ -85,19 +84,22 @@ def setDiffField(self, pt_name, field, diff):
             self._p_changed = 1
 
     ## Interface fulfillment ##
-    @security.protected(ManagePortal)
+    security.declareProtected(ManagePortal, 'listDiffTypes')
+
     def listDiffTypes(self):
         """List the names of the registered difference types"""
         return self._difftypes.keys()
 
-    @security.protected(ManagePortal)
+    security.declareProtected(ManagePortal, 'getDiffType')
+
     def getDiffType(self, diff):
         """Return a class corresponding to the specified diff type.
         Instances of the class will implement the IDifference
         interface"""
         return self._difftypes.get(diff, None)
 
-    @security.protected(ManagePortal)
+    security.declareProtected(ManagePortal, 'setDiffForPortalType')
+
     def setDiffForPortalType(self, pt_name, mapping):
         """Set the difference type(self, s) for the specific portal type
 
@@ -108,7 +110,8 @@ def setDiffForPortalType(self, pt_name, mapping):
         self._pt_diffs[pt_name] = mapping.copy()
         self._p_changed = 1
 
-    @security.protected(ManagePortal)
+    security.declareProtected(ManagePortal, 'getDiffForPortalType')
+
     def getDiffForPortalType(self, pt_name):
         """Returns a dictionary where each key is an attribute or
         method on the given portal type, and the value is the name of
@@ -116,7 +119,8 @@ def getDiffForPortalType(self, pt_name):
         # Return a copy so we don't have to worry about the user changing it
         return self._pt_diffs.get(pt_name, {}).copy()
 
-    @security.public
+    security.declarePublic('computeDiff')
+
     def computeDiff(self, ob1, ob2, id1=None, id2=None):
         """Compute the differences between two objects and return the
         results as a list.  Each object in the list will implement the
@@ -145,7 +149,8 @@ def computeDiff(self, ob1, ob2, id1=None, id2=None):
                 diffs.append(f_diff)
         return diffs
 
-    @security.public
+    security.declarePublic('createChangeSet')
+
     def createChangeSet(self, ob1, ob2, id1=None, id2=None):
         """Returns a ChangeSet object that represents the differences
         between ob1 and ob2 (ie. ob2 - ob1) ."""
diff --git a/Products/CMFDiffTool/testing.py b/Products/CMFDiffTool/testing.py
index c74fa19..f6316bb 100644
--- a/Products/CMFDiffTool/testing.py
+++ b/Products/CMFDiffTool/testing.py
@@ -1,14 +1,15 @@
-# -*- coding: utf-8 -*-
-from Products.CMFCore.utils import getToolByName
-from plone.app.testing import FunctionalTesting
-from plone.app.testing import PloneSandboxLayer
-from plone.app.testing.bbb import PTC_FIXTURE
+#coding=utf8
 from plone.dexterity.fti import DexterityFTI
+from Products.CMFCore.utils import getToolByName
+from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 from zope.component import getSiteManager
 from zope.schema.interfaces import IVocabularyFactory
-from zope.schema.vocabulary import SimpleTerm
-from zope.schema.vocabulary import SimpleVocabulary
 
+from plone.app.testing.bbb import PTC_FIXTURE
+from plone.app.testing import PloneSandboxLayer
+from plone.app.testing import FunctionalTesting
+from plone.app.testing import applyProfile
+from plone.testing import z2
 
 TEST_CONTENT_TYPE_ID = 'TestContentType'
 
diff --git a/Products/CMFDiffTool/tests/testChangeSet.py b/Products/CMFDiffTool/tests/testChangeSet.py
index 79aa6b0..8e42165 100644
--- a/Products/CMFDiffTool/tests/testChangeSet.py
+++ b/Products/CMFDiffTool/tests/testChangeSet.py
@@ -2,13 +2,16 @@
 #
 # CMFDiffTool tests
 #
-from Acquisition import aq_base
+from os import linesep
 from Products.CMFCore.utils import getToolByName
+
 from Products.CMFDiffTool.ChangeSet import BaseChangeSet
-from os import linesep
-from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FUNCTIONAL_TESTING
+from Acquisition import aq_base
+
 from unittest import TestCase
 
+from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FUNCTIONAL_TESTING
+
 
 class TestChangeSet(TestCase):
     """Tests for ChangeSet objects"""
@@ -31,34 +34,16 @@ def testInterface(self):
     def setupTestObjects(self):
         self.folder.invokeFactory('Document', 'doc1', title='My Title')
         self.folder.manage_pasteObjects(
-            self.folder.manage_copyObjects(['doc1'])
-        )
+                                     self.folder.manage_copyObjects(['doc1']))
         self.p_diff.setDiffField('Document', 'Title', 'Field Diff')
 
     def setupTestFolders(self):
-        self.folder.invokeFactory(
-            'Folder',
-            'folder1',
-            title='My Folder Title'
-        )
-        self.folder.folder1.invokeFactory(
-            'Document',
-            'doc1',
-            title='My Title1'
-        )
-        self.folder.folder1.invokeFactory(
-            'Document',
-            'doc2',
-            title='My Title2'
-        )
-        self.folder.folder1.invokeFactory(
-            'Document',
-            'doc3',
-            title='My Title3'
-        )
+        self.folder.invokeFactory('Folder', 'folder1', title='My Folder Title')
+        self.folder.folder1.invokeFactory('Document', 'doc1', title='My Title1')
+        self.folder.folder1.invokeFactory('Document', 'doc2', title='My Title2')
+        self.folder.folder1.invokeFactory('Document', 'doc3', title='My Title3')
         self.folder.manage_pasteObjects(
-            self.folder.manage_copyObjects(['folder1'])
-        )
+                                  self.folder.manage_copyObjects(['folder1']))
         self.p_diff.setDiffField('Document', 'Title', 'Field Diff')
         self.p_diff.setDiffField('Folder', 'title', 'Field Diff')
 
@@ -157,10 +142,8 @@ def testChangeSetFolderDocRemoved(self):
 
     def testChangeSetFolderDocAdded(self):
         self.setupTestFolders()
-        self.folder.copy_of_folder1.invokeFactory(
-            'Document', 'doc4',
-            title='My Doc Title'
-        )
+        self.folder.copy_of_folder1.invokeFactory('Document', 'doc4',
+                                                         title='My Doc Title')
         self.cs.computeDiff(self.folder.folder1, self.folder.copy_of_folder1)
         diffs = self.cs.getDiffs()
         self.assertEqual(len(diffs), 1)
@@ -180,10 +163,8 @@ def testChangeSetFolderReordered(self):
         self.setupTestFolders()
         if hasattr(aq_base(self.folder.copy_of_folder1), 'moveObjectsToTop'):
             self.folder.copy_of_folder1.moveObjectsToTop(['doc3'])
-        elif hasattr(
-            aq_base(self.folder.copy_of_folder1),
-            'moveObjectsByDelta'
-        ):
+        elif hasattr(aq_base(self.folder.copy_of_folder1),
+                                                        'moveObjectsByDelta'):
             self.folder.copy_of_folder1.moveObjectsByDelta(['doc3'], -3)
         else:
             # We don't have an orderable folder give up
@@ -205,13 +186,10 @@ def testChangeSetFolderReordered(self):
         # XXX we need an explicit way of noting reorders
 
     def testChangeSetFolderComplex(self):
-        self.setupTestFolders()
+        self.setupTestFolders()\
         # Add a new sub object
-        self.folder.copy_of_folder1.invokeFactory(
-            'Document',
-            'doc4',
-            title='My Doc Title'
-        )
+        self.folder.copy_of_folder1.invokeFactory('Document', 'doc4',
+                                                         title='My Doc Title')
         # Delete a sub object
         self.folder.copy_of_folder1.manage_delObjects('doc2')
         # Change one object
@@ -221,10 +199,8 @@ def testChangeSetFolderComplex(self):
         # Move the changed object
         if hasattr(aq_base(self.folder.copy_of_folder1), 'moveObjectsToTop'):
             self.folder.copy_of_folder1.moveObjectsToTop(['doc3'])
-        elif hasattr(
-            aq_base(self.folder.copy_of_folder1),
-            'moveObjectsByDelta'
-        ):
+        elif hasattr(aq_base(self.folder.copy_of_folder1),
+                                                        'moveObjectsByDelta'):
             self.folder.copy_of_folder1.moveObjectsByDelta(['doc3'], -3)
         else:
             # We don't have an orderable folder give up




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 12329 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140930/0f8ff0ee/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 102515 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140930/0f8ff0ee/attachment-0003.obj>


More information about the Testbot mailing list