Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ATContentTypes.tests.test_atfolder.TestAutoSortSupport Class Reference
Inheritance diagram for ATContentTypes.tests.test_atfolder.TestAutoSortSupport:
Inheritance graph
[legend]
Collaboration diagram for ATContentTypes.tests.test_atfolder.TestAutoSortSupport:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def test_autoordering
def test_strangeUnallowedIds

Public Attributes

 fobj
 objs

Detailed Description

Definition at line 196 of file test_atfolder.py.


Member Function Documentation

Definition at line 198 of file test_atfolder.py.

00198 
00199     def afterSetUp(self):
00200         atcttestcase.ATCTSiteTestCase.afterSetUp(self)
00201         self.folder.invokeFactory('Folder', 'fobj', title='folder 1')
00202         self.fobj = self.folder.fobj
00203         self.objs = (('Document', 'x1', 'Document 3'),
00204                      ('Document', 'x2', 'Document 4'),
00205                      ('Document', 'doc1', 'Document 1'),
00206                      ('Document', 'doc2', 'Document 2'),
00207                      ('Folder', 'folder1', 'Folder 1'),
00208                      ('Folder', 'folder2', 'Folder 2'),
00209                     )
00210         for pt, id, title in self.objs:
00211             self.fobj.invokeFactory(pt, id, title=title)

Definition at line 212 of file test_atfolder.py.

00212 
00213     def test_autoordering(self):
00214         f = self.fobj
00215         self.failUnlessEqual(f.getDefaultSorting(), ('Title', False))
00216         self.failUnlessEqual(f.getSortFolderishFirst(), True)
00217         self.failUnlessEqual(f.getSortReverse(), False)
00218         self.failUnlessEqual(f.getSortAuto(), True)
00219 
00220         f.setDefaultSorting('getId', reverse=True)
00221         f.setSortFolderishFirst(False)
00222         f.setSortReverse(True)
00223         f.setSortAuto(False)
00224 
00225         self.failUnlessEqual(f.getDefaultSorting(), ('getId', True))
00226         self.failUnlessEqual(f.getSortFolderishFirst(), False)
00227         self.failUnlessEqual(f.getSortReverse(), True)
00228         self.failUnlessEqual(f.getSortAuto(), False)

Certain IDs used to give an error and are unusable

They're set in zope's lib/python/App/Product.py. Examples:
home, version. This test used to include 'icon', too, but that's
apparently really an id that's already been taken (instead of
a bug).

Definition at line 229 of file test_atfolder.py.

00229 
00230     def test_strangeUnallowedIds(self):
00231         """ Certain IDs used to give an error and are unusable
00232 
00233         They're set in zope's lib/python/App/Product.py. Examples:
00234         home, version. This test used to include 'icon', too, but that's
00235         apparently really an id that's already been taken (instead of
00236         a bug).
00237         """
00238         strangeIds = ['home', 'version']
00239         for id in strangeIds:
00240             self.folder.invokeFactory('Folder', id)
00241             self.assert_(id in self.folder.objectIds())


Member Data Documentation

Definition at line 201 of file test_atfolder.py.

Definition at line 202 of file test_atfolder.py.


The documentation for this class was generated from the following file: