Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

finish removing the LargePloneFolder class and portal_type. refs #101…

…24. Still need to add UI for changing the ordering of a folder.

svn path=/plone.app.folder/trunk/; revision=36695
  • Loading branch information...
commit cbca37c0ebac3481549117711370886a5987f5fa 1 parent cf07c38
@davisagli davisagli authored
View
2  benchmarks/convert.py
@@ -4,7 +4,7 @@
from re import compile
from sys import argv
-test = compile(r'^\s*test(.*)(Regular|Large|Ordered) \(')
+test = compile(r'^\s*test(.*)(Regular|Unordered|Ordered) \(')
time = compile(r'([\d.]*) seconds$')
bench = {}
View
3  docs/HISTORY.txt
@@ -4,6 +4,9 @@ Changelog
1.0b7 - Unreleased
------------------
+* Updated tests to not rely on the existence of the Large Plone Folder type,
+ which was removed for Plone 4.
+ [davisagli]
1.0b6 - Released May 2, 2010
----------------------------
View
31 src/plone/app/folder/tests/benchmarks.py
@@ -40,7 +40,8 @@ def create(container, nr):
obj.reindexObject(idxs=('Title', 'Description', 'SearchableText'))
regular = createNonBTreeFolder('Folder', portal, 'regular')
- large = _createObjectByType('Large Plone Folder', portal, 'large')
+ unordered = _createObjectByType('Folder', portal, 'unordered')
+ unordered.setOrdering(u'unordered')
ordered = _createObjectByType('Folder', portal, 'ordered')
@timecall
@@ -48,16 +49,16 @@ def testCreateContentRegular():
for x in range(SIZE):
create(regular, x)
@timecall
- def testCreateContentLarge():
+ def testCreateContentUnordered():
for x in range(SIZE):
- create(large, x)
+ create(unordered, x)
@timecall
def testCreateContentOrdered():
for x in range(SIZE):
create(ordered, x)
testCreateContentRegular()
- testCreateContentLarge()
+ testCreateContentUnordered()
testCreateContentOrdered()
commit()
@@ -69,7 +70,7 @@ def tearDown(cls):
def afterSetUp(self):
self.regular = self.portal.regular
- self.large = self.portal.large
+ self.unordered = self.portal.unordered
self.ordered = self.portal.ordered
@@ -79,9 +80,9 @@ def testObjectIDsRegular(self):
for x in range(5000):
[i for i in self.regular.objectIds()]
@timecall
- def testObjectIDsLarge(self):
+ def testObjectIDsUnordered(self):
for x in range(5000):
- [i for i in self.large.objectIds()]
+ [i for i in self.unordered.objectIds()]
@timecall
def testObjectIDsOrdered(self):
for x in range(5000):
@@ -93,9 +94,9 @@ def testObjectValuesRegular(self):
for x in range(500):
[obj for obj in self.regular.objectValues()]
@timecall
- def testObjectValuesLarge(self):
+ def testObjectValuesUnordered(self):
for x in range(500):
- [obj for obj in self.large.objectValues()]
+ [obj for obj in self.unordered.objectValues()]
@timecall
def testObjectValuesOrdered(self):
for x in range(500):
@@ -108,10 +109,10 @@ def testObjectPositionRegular(self):
for x in range(100 ** 2):
self.regular.getObjectPosition(id)
@timecall
- def testObjectPositionLarge(self):
+ def testObjectPositionUnordered(self):
id = 'doc.%d' % (SIZE / 2)
for x in range(100 ** 2):
- self.large.getObjectPosition(id)
+ self.unordered.getObjectPosition(id)
@timecall
def testObjectPositionOrdered(self):
id = 'doc.%d' % (SIZE / 2)
@@ -125,9 +126,9 @@ def testBatchRegular(self):
batch = Batch(sequence=self.regular.objectValues(), size=SIZE / 10, start=SIZE * 4 / 5)
[b for b in batch]
@timecall
- def testBatchLarge(self):
+ def testBatchUnordered(self):
for x in range(500):
- batch = Batch(sequence=self.large.objectValues(), size=SIZE / 10, start=SIZE * 4 / 5)
+ batch = Batch(sequence=self.unordered.objectValues(), size=SIZE / 10, start=SIZE * 4 / 5)
[b for b in batch]
@timecall
def testBatchOrdered(self):
@@ -141,9 +142,9 @@ def testRandomRegular(self):
for x in range(1000):
self.regular['doc.%d' % randint(0, SIZE-1)]
@timecall
- def testRandomLarge(self):
+ def testRandomUnordered(self):
for x in range(1000):
- self.large['doc.%d' % randint(0, SIZE-1)]
+ self.unordered['doc.%d' % randint(0, SIZE-1)]
@timecall
def testRandomOrdered(self):
for x in range(1000):
View
3  src/plone/app/folder/tests/test_migration.py
@@ -4,6 +4,7 @@
from zope.publisher.browser import TestRequest
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2Base as BTreeFolder
from Products.ATContentTypes.content.document import ATDocument
+from Products.CMFPlone.utils import _createObjectByType
from plone.folder.interfaces import IOrderable, IOrdering
from plone.app.folder.tests.base import IntegrationTestCase
from plone.app.folder.tests.layer import IntegrationLayer
@@ -114,7 +115,7 @@ def testNestedReverseMigrate(self):
def testIsSaneBTreeFolder(self):
# positive case
- create('Large Plone Folder', self.portal, 'btree')
+ _createObjectByType('Folder', self.portal, 'btree')
self.failUnless(isSaneBTreeFolder(self.portal.btree))
# negative case
create('Folder', self.portal, 'folder')
View
4 test-patches/atcontenttypes.patch
@@ -105,8 +105,8 @@ Index extras/Products.ATContentTypes/Products/ATContentTypes/tests/test_installa
# test that all types are installed well
ttool = self.ttool
ids = ('Document', 'Favorite', 'File',
-- 'Folder', 'Image', 'Large Plone Folder', 'Link',
-+ 'Image', 'Large Plone Folder', 'Link',
+- 'Folder', 'Image', 'Link',
++ 'Image', 'Link',
'News Item', 'Topic', 'Event')
tids = ttool.objectIds()
Please sign in to comment.
Something went wrong with that request. Please try again.