[Testbot] Plone 4.3 - Python 2.6 - Build # 2193 - Fixed! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Thu Jul 3 09:33:44 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 2193 - Fixed!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.6/2193/


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

Repository: Products.CMFPlone
Branch: refs/heads/4.3.x
Date: 2014-07-03T01:14:40+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits at vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/7e1d4b33090f8921174433f647f8e38a611a7e60

Revert "folder_position script: make position and id optional."

This reverts commit ee99d8934a79529948dede2fd0fb0e3119d1c2ff.

After this commit there is a test failure in plone.app.search that
should be unrelated, but let's see what happens.

Files changed:
M Products/CMFPlone/skins/plone_scripts/folder_position.cpy
M Products/CMFPlone/tests/testCatalogTool.py
M docs/CHANGES.rst

diff --git a/Products/CMFPlone/skins/plone_scripts/folder_position.cpy b/Products/CMFPlone/skins/plone_scripts/folder_position.cpy
index 2cd84e4..24ee13e 100644
--- a/Products/CMFPlone/skins/plone_scripts/folder_position.cpy
+++ b/Products/CMFPlone/skins/plone_scripts/folder_position.cpy
@@ -6,7 +6,7 @@
 ##bind script=script
 ##bind state=state
 ##bind subpath=traverse_subpath
-##parameters=position='ordered', id=None, template_id='folder_contents', delta=1, reverse=None
+##parameters=position, id, template_id='folder_contents', delta=1, reverse=None 
 
 from Products.CMFPlone import PloneMessageFactory as _
 delta = int(delta)
diff --git a/Products/CMFPlone/tests/testCatalogTool.py b/Products/CMFPlone/tests/testCatalogTool.py
index 4187368..64a56d7 100644
--- a/Products/CMFPlone/tests/testCatalogTool.py
+++ b/Products/CMFPlone/tests/testCatalogTool.py
@@ -625,10 +625,10 @@ class TestCatalogOrdering(PloneTestCase.PloneTestCase):
 
     def afterSetUp(self):
         self.catalog = self.portal.portal_catalog
-        self.folder.invokeFactory('Document', id='doc1', text='foo', title='First')
-        self.folder.invokeFactory('Document', id='doc2', text='bar', title='Second')
-        self.folder.invokeFactory('Document', id='doc3', text='bloo', title='Third')
-        self.folder.invokeFactory('Document', id='doc4', text='blee', title='Fourth')
+        self.folder.invokeFactory('Document', id='doc1', text='foo')
+        self.folder.invokeFactory('Document', id='doc2', text='bar')
+        self.folder.invokeFactory('Document', id='doc3', text='bloo')
+        self.folder.invokeFactory('Document', id='doc4', text='blee')
 
     def testInitialOrder(self):
         self.assertEqual(self.folder.getObjectPosition('doc1'), 0)
@@ -636,17 +636,6 @@ def testInitialOrder(self):
         self.assertEqual(self.folder.getObjectPosition('doc3'), 2)
         self.assertEqual(self.folder.getObjectPosition('doc4'), 3)
 
-    def testOrderIsUnchangedOnDefaultFolderPosition(self):
-        # Calling the folder_position script with no arguments should
-        # give no complaints and have no effect.
-        self.folder.folder_position()
-        folder_docs = self.catalog(
-                            portal_type='Document',
-                            path='/'.join(self.folder.getPhysicalPath()),
-                            sort_on='getObjPositionInParent')
-        expected = ['doc1', 'doc2', 'doc3', 'doc4']
-        self.assertEqual([b.getId for b in folder_docs], expected)
-
     def testOrderIsUpdatedOnMoveDown(self):
         self.folder.folder_position('down', 'doc1')
         folder_docs = self.catalog(
@@ -683,33 +672,6 @@ def testOrderIsUpdatedOnMoveBottom(self):
         expected = ['doc1', 'doc2', 'doc4', 'doc3']
         self.assertEqual([b.getId for b in folder_docs], expected)
 
-    def testOrderIsUpdatedOnSort(self):
-        self.folder.folder_position(id='Title')
-        folder_docs = self.catalog(
-                            portal_type='Document',
-                            path='/'.join(self.folder.getPhysicalPath()),
-                            sort_on='getObjPositionInParent')
-        expected = ['doc1', 'doc4', 'doc2', 'doc3']
-        self.assertEqual([b.getId for b in folder_docs], expected)
-
-    def testOrderIsUpdatedOnReverse(self):
-        self.folder.folder_position(id='Title', reverse=True)
-        folder_docs = self.catalog(
-                            portal_type='Document',
-                            path='/'.join(self.folder.getPhysicalPath()),
-                            sort_on='getObjPositionInParent')
-        expected = ['doc3', 'doc2', 'doc4', 'doc1']
-        self.assertEqual([b.getId for b in folder_docs], expected)
-
-    def testOrderIsUpdatedOnSimpleReverse(self):
-        self.folder.folder_position(reverse=True)
-        folder_docs = self.catalog(
-                            portal_type='Document',
-                            path='/'.join(self.folder.getPhysicalPath()),
-                            sort_on='getObjPositionInParent')
-        expected = ['doc4', 'doc3', 'doc2', 'doc1']
-        self.assertEqual([b.getId for b in folder_docs], expected)
-
     def testOrderIsFineWithObjectCreation(self):
         self.folder.invokeFactory('Document', id='doc5', text='blam')
         folder_docs = self.catalog(
diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index 33c8040..22d08fa 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -8,12 +8,6 @@ Changelog
 4.3.4 (unreleased)
 ------------------
 
-- folder_position script: make position and id optional.  Default
-  position to 'ordered' and id to None, which means: do nothing.
-  plone.folder 1.0.5 allows this, making it possible to simply reverse
-  the current sort order by using reverse=False.
-  [maurits]
-
 - Abstract the search form and livesearch action URLs making it easier to
   extend the search portlet with custom views or other actions.
   [rpatterson]




-------------------------------------------------------------------------------


More information about the Testbot mailing list