Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.workflow.tests.test_folder_workflow.TestFolderWorkflow Class Reference
Inheritance diagram for plone.app.workflow.tests.test_folder_workflow.TestFolderWorkflow:
Inheritance graph
[legend]
Collaboration diagram for plone.app.workflow.tests.test_folder_workflow.TestFolderWorkflow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testOwnerHidesVisibleFolder
def testOwnerShowsPrivateFolder
def testOwnerPublishesPrivateFolder
def testOwnerPublishesVisibleFolder
def testOwnerHidesPublishedFolder
def testOwnerRetractsPublishedFolder
def testManagerPublishesVisibleFolder
def testManagerPublishesPrivateFolder
def testManagerRetractsPublishedFolder
def testMemberHidesVisibleFolder
def testMemberShowsPrivateFolder
def testMemberPublishesVisibleFolder
def testMemberPublishesPrivateFolder
def testMemberHidesPublishedFolder
def testMemberRetractsPublishedFolder
def testReviewerHidesVisibleFolder
def testReviewerShowsPrivateFolder
def testReviewerPublishesVisibleFolder
def testReviewerPublishesPrivateFolder
def testReviewerHidesPublishedFolder
def testReviewerRetractsPublishedFolder
def testManagerHidesVisibleFolder
def testManagerShowsPrivateFolder
def testManagerHidesPublishedFolder
def testViewVisibleFolder
def testViewIsNotAcquiredInVisibleState
def testViewPrivateFolder
def testViewIsNotAcquiredInPrivateState
def testViewPublishedFolder
def testViewIsNotAcquiredInPublishedState
def testAccessVisibleFolderContents
def testAccessContentsInformationIsNotAcquiredInVisibleState
def testAccessPrivateFolderContents
def testAccessContentsInformationIsNotAcquiredInPrivateState
def testAccessPublishedFolderContents
def testAccessContentsInformationIsNotAcquiredInPublishedState
def testModifyVisibleFolderContents
def testModifyPortalContentIsNotAcquiredInVisibleState
def testModifyPrivateFolderContents
def testModifyPortalContentIsNotAcquiredInPrivateState
def testModifyPublishedFolderContents
def testModifyPortalContentIsNotAcquiredInPublishedState
def testListVisibleFolderContents
def testListFolderContentsIsNotAcquiredInVisibleState
def testListPrivateFolderContents
def testListFolderContentsIsNotAcquiredInPrivateState
def testListPublishedFolderContents
def testListFolderContentsIsNotAcquiredInPublishedState
def testFindVisibleFolder
def testFindPrivateFolder
def testFindPublishedFolder

Public Attributes

 catalog
 workflow
 dir

Detailed Description

Definition at line 16 of file test_folder_workflow.py.


Member Function Documentation

Definition at line 18 of file test_folder_workflow.py.

00018 
00019     def afterSetUp(self):
00020         self.catalog = self.portal.portal_catalog
00021         self.workflow = self.portal.portal_workflow
00022         
00023         self.workflow.setChainForPortalTypes(['Folder'], 'folder_workflow')
00024 
00025         self.portal.acl_users._doAddUser('member', 'secret', ['Member'], [])
00026         self.portal.acl_users._doAddUser('reviewer', 'secret', ['Reviewer'], [])
00027         self.portal.acl_users._doAddUser('manager', 'secret', ['Manager'], [])
00028 
00029         self.folder.invokeFactory('Folder', id='dir')
00030         self.dir = self.folder.dir

Definition at line 269 of file test_folder_workflow.py.

00269 
00270     def testAccessContentsInformationIsNotAcquiredInPrivateState(self):
00271         self.workflow.doActionFor(self.dir, 'hide')
00272         self.assertEqual(self.dir.acquiredRolesAreUsedBy(AccessContentsInformation), '')

Definition at line 287 of file test_folder_workflow.py.

00287 
00288     def testAccessContentsInformationIsNotAcquiredInPublishedState(self):
00289         self.workflow.doActionFor(self.dir, 'publish')
00290         self.assertEqual(self.dir.acquiredRolesAreUsedBy(AccessContentsInformation), '')

Definition at line 252 of file test_folder_workflow.py.

00252 
00253     def testAccessContentsInformationIsNotAcquiredInVisibleState(self):
00254         self.assertEqual(self.dir.acquiredRolesAreUsedBy(AccessContentsInformation), '')

Definition at line 255 of file test_folder_workflow.py.

00255 
00256     def testAccessPrivateFolderContents(self):
00257         self.workflow.doActionFor(self.dir, 'hide')
00258         # Owner is allowed
00259         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00260         # Member is denied
00261         self.login('member')
00262         self.failIf(checkPerm(AccessContentsInformation, self.dir))
00263         # Reviewer is denied
00264         self.login('reviewer')
00265         self.failIf(checkPerm(AccessContentsInformation, self.dir))
00266         # Anonymous is denied
00267         self.logout()
00268         self.failIf(checkPerm(AccessContentsInformation, self.dir))

Here is the call graph for this function:

Definition at line 273 of file test_folder_workflow.py.

00273 
00274     def testAccessPublishedFolderContents(self):
00275         self.workflow.doActionFor(self.dir, 'publish')
00276         # Owner is allowed
00277         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00278         # Member is allowed
00279         self.login('member')
00280         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00281         # Reviewer is allowed
00282         self.login('reviewer')
00283         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00284         # Anonymous is allowed
00285         self.logout()
00286         self.failUnless(checkPerm(AccessContentsInformation, self.dir))

Here is the call graph for this function:

Definition at line 239 of file test_folder_workflow.py.

00239 
00240     def testAccessVisibleFolderContents(self):
00241         # Owner is allowed
00242         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00243         # Member is allowed
00244         self.login('member')
00245         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00246         # Reviewer is allowed
00247         self.login('reviewer')
00248         self.failUnless(checkPerm(AccessContentsInformation, self.dir))
00249         # Anonymous is allowed
00250         self.logout()
00251         self.failUnless(checkPerm(AccessContentsInformation, self.dir))

Here is the call graph for this function:

Definition at line 414 of file test_folder_workflow.py.

00414 
00415     def testFindPrivateFolder(self):
00416         self.workflow.doActionFor(self.dir, 'hide')
00417         # Owner is allowed
00418         self.failUnless(self.catalog(id='dir'))
00419         # Member is denied
00420         self.login('member')
00421         self.failIf(self.catalog(id='dir'))
00422         # Reviewer is denied
00423         self.login('reviewer')
00424         self.failIf(self.catalog(id='dir'))
00425         # Anonymous is denied
00426         self.logout()
00427         self.failIf(self.catalog(id='dir'))

Here is the call graph for this function:

Definition at line 428 of file test_folder_workflow.py.

00428 
00429     def testFindPublishedFolder(self):
00430         self.workflow.doActionFor(self.dir, 'publish')
00431         # Owner is allowed
00432         self.failUnless(self.catalog(id='dir'))
00433         # Member is allowed
00434         self.login('member')
00435         self.failUnless(self.catalog(id='dir'))
00436         # Reviewer is allowed
00437         self.login('reviewer')
00438         self.failUnless(self.catalog(id='dir'))
00439         # Anonymous is allowed
00440         self.logout()
00441         self.failUnless(self.catalog(id='dir'))
00442 

Here is the call graph for this function:

Definition at line 401 of file test_folder_workflow.py.

00401 
00402     def testFindVisibleFolder(self):
00403         # Owner is allowed
00404         self.failUnless(self.catalog(id='dir'))
00405         # Member is allowed
00406         self.login('member')
00407         self.failUnless(self.catalog(id='dir'))
00408         # Reviewer is allowed
00409         self.login('reviewer')
00410         self.failUnless(self.catalog(id='dir'))
00411         # Anonymous is allowed
00412         self.logout()
00413         self.failUnless(self.catalog(id='dir'))

Here is the call graph for this function:

Definition at line 377 of file test_folder_workflow.py.

00377 
00378     def testListFolderContentsIsNotAcquiredInPrivateState(self):
00379         self.workflow.doActionFor(self.dir, 'hide')
00380         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ListFolderContents), '')

Definition at line 395 of file test_folder_workflow.py.

00395 
00396     def testListFolderContentsIsNotAcquiredInPublishedState(self):
00397         self.workflow.doActionFor(self.dir, 'publish')
00398         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ListFolderContents), '')

Definition at line 360 of file test_folder_workflow.py.

00360 
00361     def testListFolderContentsIsNotAcquiredInVisibleState(self):
00362         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ListFolderContents), '')

Definition at line 363 of file test_folder_workflow.py.

00363 
00364     def testListPrivateFolderContents(self):
00365         self.workflow.doActionFor(self.dir, 'hide')
00366         # Owner is allowed
00367         self.failUnless(checkPerm(ListFolderContents, self.dir))
00368         # Member is denied
00369         self.login('member')
00370         self.failIf(checkPerm(ListFolderContents, self.dir))
00371         # Reviewer is denied
00372         self.login('reviewer')
00373         self.failIf(checkPerm(ListFolderContents, self.dir))
00374         # Anonymous is denied
00375         self.logout()
00376         self.failIf(checkPerm(ListFolderContents, self.dir))

Here is the call graph for this function:

Definition at line 381 of file test_folder_workflow.py.

00381 
00382     def testListPublishedFolderContents(self):
00383         self.workflow.doActionFor(self.dir, 'publish')
00384         # Owner is allowed
00385         self.failUnless(checkPerm(ListFolderContents, self.dir))
00386         # Member is allowed
00387         self.login('member')
00388         self.failUnless(checkPerm(ListFolderContents, self.dir))
00389         # Reviewer is allowed
00390         self.login('reviewer')
00391         self.failUnless(checkPerm(ListFolderContents, self.dir))
00392         # Anonymous is allowed
00393         self.logout()
00394         self.failUnless(checkPerm(ListFolderContents, self.dir))

Here is the call graph for this function:

Definition at line 347 of file test_folder_workflow.py.

00347 
00348     def testListVisibleFolderContents(self):
00349         # Owner is allowed
00350         self.failUnless(checkPerm(ListFolderContents, self.dir))
00351         # Member is allowed
00352         self.login('member')
00353         self.failUnless(checkPerm(ListFolderContents, self.dir))
00354         # Reviewer is denied
00355         self.login('reviewer')
00356         self.failIf(checkPerm(ListFolderContents, self.dir))
00357         # Anonymous is denied
00358         self.logout()
00359         self.failIf(checkPerm(ListFolderContents, self.dir))

Here is the call graph for this function:

Definition at line 177 of file test_folder_workflow.py.

00177 
00178     def testManagerHidesPublishedFolder(self):
00179         self.workflow.doActionFor(self.dir, 'publish')
00180         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00181         self.login('manager')
00182         self.workflow.doActionFor(self.dir, 'hide')

Here is the call graph for this function:

Definition at line 166 of file test_folder_workflow.py.

00166 
00167     def testManagerHidesVisibleFolder(self):
00168         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00169         self.login('manager')
00170         self.workflow.doActionFor(self.dir, 'hide')

Here is the call graph for this function:

Definition at line 80 of file test_folder_workflow.py.

00080 
00081     def testManagerPublishesPrivateFolder(self):
00082         self.workflow.doActionFor(self.dir, 'hide')
00083         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00084         self.login('manager')
00085         self.workflow.doActionFor(self.dir, 'publish')
00086         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00087         self.failUnless(self.catalog(id='dir', review_state='published'))

Here is the call graph for this function:

Definition at line 73 of file test_folder_workflow.py.

00073 
00074     def testManagerPublishesVisibleFolder(self):
00075         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00076         self.login('manager')
00077         self.workflow.doActionFor(self.dir, 'publish')
00078         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00079         self.failUnless(self.catalog(id='dir', review_state='published'))

Here is the call graph for this function:

Definition at line 88 of file test_folder_workflow.py.

00088 
00089     def testManagerRetractsPublishedFolder(self):
00090         self.workflow.doActionFor(self.dir, 'publish')
00091         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00092         self.login('manager')
00093         self.workflow.doActionFor(self.dir, 'retract')
00094         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00095         self.failUnless(self.catalog(id='dir', review_state='visible'))

Here is the call graph for this function:

Definition at line 171 of file test_folder_workflow.py.

00171 
00172     def testManagerShowsPrivateFolder(self):
00173         self.workflow.doActionFor(self.dir, 'hide')
00174         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00175         self.login('manager')
00176         self.workflow.doActionFor(self.dir, 'show')

Here is the call graph for this function:

Definition at line 120 of file test_folder_workflow.py.

00120 
00121     def testMemberHidesPublishedFolder(self):
00122         self.workflow.doActionFor(self.dir, 'publish')
00123         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00124         self.login('member')
00125         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'hide')

Here is the call graph for this function:

Definition at line 98 of file test_folder_workflow.py.

00098 
00099     def testMemberHidesVisibleFolder(self):
00100         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00101         self.login('member')
00102         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'hide')

Here is the call graph for this function:

Definition at line 114 of file test_folder_workflow.py.

00114 
00115     def testMemberPublishesPrivateFolder(self):
00116         self.workflow.doActionFor(self.dir, 'hide')
00117         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00118         self.login('member')
00119         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'publish')

Here is the call graph for this function:

Definition at line 109 of file test_folder_workflow.py.

00109 
00110     def testMemberPublishesVisibleFolder(self):
00111         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00112         self.login('member')
00113         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'publish')

Here is the call graph for this function:

Definition at line 126 of file test_folder_workflow.py.

00126 
00127     def testMemberRetractsPublishedFolder(self):
00128         self.workflow.doActionFor(self.dir, 'publish')
00129         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00130         self.login('member')
00131         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'retract')

Here is the call graph for this function:

Definition at line 103 of file test_folder_workflow.py.

00103 
00104     def testMemberShowsPrivateFolder(self):
00105         self.workflow.doActionFor(self.dir, 'hide')
00106         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00107         self.login('member')
00108         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'show')

Here is the call graph for this function:

Definition at line 323 of file test_folder_workflow.py.

00323 
00324     def testModifyPortalContentIsNotAcquiredInPrivateState(self):
00325         self.workflow.doActionFor(self.dir, 'hide')
00326         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ModifyPortalContent), '')

Definition at line 341 of file test_folder_workflow.py.

00341 
00342     def testModifyPortalContentIsNotAcquiredInPublishedState(self):
00343         self.workflow.doActionFor(self.dir, 'publish')
00344         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ModifyPortalContent), '')

Definition at line 306 of file test_folder_workflow.py.

00306 
00307     def testModifyPortalContentIsNotAcquiredInVisibleState(self):
00308         self.assertEqual(self.dir.acquiredRolesAreUsedBy(ModifyPortalContent), '')

Definition at line 309 of file test_folder_workflow.py.

00309 
00310     def testModifyPrivateFolderContents(self):
00311         self.workflow.doActionFor(self.dir, 'hide')
00312         # Owner is allowed
00313         self.failUnless(checkPerm(ModifyPortalContent, self.dir))
00314         # Member is denied
00315         self.login('member')
00316         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00317         # Reviewer is denied
00318         self.login('reviewer')
00319         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00320         # Anonymous is denied
00321         self.logout()
00322         self.failIf(checkPerm(ModifyPortalContent, self.dir))

Here is the call graph for this function:

Definition at line 327 of file test_folder_workflow.py.

00327 
00328     def testModifyPublishedFolderContents(self):
00329         self.workflow.doActionFor(self.dir, 'publish')
00330         # Owner is allowed
00331         self.failUnless(checkPerm(ModifyPortalContent, self.dir))
00332         # Member is denied
00333         self.login('member')
00334         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00335         # Reviewer is denied
00336         self.login('reviewer')
00337         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00338         # Anonymous is denied
00339         self.logout()
00340         self.failIf(checkPerm(ModifyPortalContent, self.dir))

Here is the call graph for this function:

Definition at line 293 of file test_folder_workflow.py.

00293 
00294     def testModifyVisibleFolderContents(self):
00295         # Owner is allowed
00296         self.failUnless(checkPerm(ModifyPortalContent, self.dir))
00297         # Member is denied
00298         self.login('member')
00299         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00300         # Reviewer is denied
00301         self.login('reviewer')
00302         self.failIf(checkPerm(ModifyPortalContent, self.dir))
00303         # Anonymous is denied
00304         self.logout()
00305         self.failIf(checkPerm(ModifyPortalContent, self.dir))

Here is the call graph for this function:

Definition at line 59 of file test_folder_workflow.py.

00059 
00060     def testOwnerHidesPublishedFolder(self):
00061         self.workflow.doActionFor(self.dir, 'publish')
00062         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00063         self.workflow.doActionFor(self.dir, 'hide')
00064         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00065         self.failUnless(self.catalog(id='dir', review_state='private'))

Definition at line 33 of file test_folder_workflow.py.

00033 
00034     def testOwnerHidesVisibleFolder(self):
00035         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00036         self.workflow.doActionFor(self.dir, 'hide')
00037         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00038         self.failUnless(self.catalog(id='dir', review_state='private'))

Definition at line 46 of file test_folder_workflow.py.

00046 
00047     def testOwnerPublishesPrivateFolder(self):
00048         self.workflow.doActionFor(self.dir, 'hide')
00049         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00050         self.workflow.doActionFor(self.dir, 'publish')
00051         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00052         self.failUnless(self.catalog(id='dir', review_state='published'))

Definition at line 53 of file test_folder_workflow.py.

00053 
00054     def testOwnerPublishesVisibleFolder(self):
00055         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00056         self.workflow.doActionFor(self.dir, 'publish')
00057         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00058         self.failUnless(self.catalog(id='dir', review_state='published'))

Definition at line 66 of file test_folder_workflow.py.

00066 
00067     def testOwnerRetractsPublishedFolder(self):
00068         self.workflow.doActionFor(self.dir, 'publish')
00069         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00070         self.workflow.doActionFor(self.dir, 'retract')
00071         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00072         self.failUnless(self.catalog(id='dir', review_state='visible'))

Definition at line 39 of file test_folder_workflow.py.

00039 
00040     def testOwnerShowsPrivateFolder(self):
00041         self.workflow.doActionFor(self.dir, 'hide')
00042         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00043         self.workflow.doActionFor(self.dir, 'show')
00044         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00045         self.failUnless(self.catalog(id='dir', review_state='visible'))

Definition at line 154 of file test_folder_workflow.py.

00154 
00155     def testReviewerHidesPublishedFolder(self):
00156         self.workflow.doActionFor(self.dir, 'publish')
00157         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00158         self.login('reviewer')
00159         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'hide')

Here is the call graph for this function:

Definition at line 132 of file test_folder_workflow.py.

00132 
00133     def testReviewerHidesVisibleFolder(self):
00134         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00135         self.login('reviewer')
00136         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'hide')

Here is the call graph for this function:

Definition at line 148 of file test_folder_workflow.py.

00148 
00149     def testReviewerPublishesPrivateFolder(self):
00150         self.workflow.doActionFor(self.dir, 'hide')
00151         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00152         self.login('reviewer')
00153         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'publish')

Here is the call graph for this function:

Definition at line 143 of file test_folder_workflow.py.

00143 
00144     def testReviewerPublishesVisibleFolder(self):
00145         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'visible')
00146         self.login('reviewer')
00147         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'publish')

Here is the call graph for this function:

Definition at line 160 of file test_folder_workflow.py.

00160 
00161     def testReviewerRetractsPublishedFolder(self):
00162         self.workflow.doActionFor(self.dir, 'publish')
00163         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'published')
00164         self.login('reviewer')
00165         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'retract')

Here is the call graph for this function:

Definition at line 137 of file test_folder_workflow.py.

00137 
00138     def testReviewerShowsPrivateFolder(self):
00139         self.workflow.doActionFor(self.dir, 'hide')
00140         self.assertEqual(self.workflow.getInfoFor(self.dir, 'review_state'), 'private')
00141         self.login('reviewer')
00142         self.assertRaises(WorkflowException, self.workflow.doActionFor, self.dir, 'show')

Here is the call graph for this function:

Definition at line 215 of file test_folder_workflow.py.

00215 
00216     def testViewIsNotAcquiredInPrivateState(self):
00217         self.workflow.doActionFor(self.dir, 'hide')
00218         self.assertEqual(self.dir.acquiredRolesAreUsedBy(View), '')

Definition at line 233 of file test_folder_workflow.py.

00233 
00234     def testViewIsNotAcquiredInPublishedState(self):
00235         self.workflow.doActionFor(self.dir, 'publish')
00236         self.assertEqual(self.dir.acquiredRolesAreUsedBy(View), '')

Definition at line 198 of file test_folder_workflow.py.

00198 
00199     def testViewIsNotAcquiredInVisibleState(self):
00200         self.assertEqual(self.dir.acquiredRolesAreUsedBy(View), '')

Definition at line 201 of file test_folder_workflow.py.

00201 
00202     def testViewPrivateFolder(self):
00203         self.workflow.doActionFor(self.dir, 'hide')
00204         # Owner is allowed
00205         self.failUnless(checkPerm(View, self.dir))
00206         # Member is denied
00207         self.login('member')
00208         self.failIf(checkPerm(View, self.dir))
00209         # Reviewer is denied
00210         self.login('reviewer')
00211         self.failIf(checkPerm(View, self.dir))
00212         # Anonymous is denied
00213         self.logout()
00214         self.failIf(checkPerm(View, self.dir))

Here is the call graph for this function:

Definition at line 219 of file test_folder_workflow.py.

00219 
00220     def testViewPublishedFolder(self):
00221         self.workflow.doActionFor(self.dir, 'publish')
00222         # Owner is allowed
00223         self.failUnless(checkPerm(View, self.dir))
00224         # Member is allowed
00225         self.login('member')
00226         self.failUnless(checkPerm(View, self.dir))
00227         # Reviewer is allowed
00228         self.login('reviewer')
00229         self.failUnless(checkPerm(View, self.dir))
00230         # Anonymous is allowed
00231         self.logout()
00232         self.failUnless(checkPerm(View, self.dir))

Here is the call graph for this function:

Definition at line 185 of file test_folder_workflow.py.

00185 
00186     def testViewVisibleFolder(self):
00187         # Owner is allowed
00188         self.failUnless(checkPerm(View, self.dir))
00189         # Member is allowed
00190         self.login('member')
00191         self.failUnless(checkPerm(View, self.dir))
00192         # Reviewer is allowed
00193         self.login('reviewer')
00194         self.failUnless(checkPerm(View, self.dir))
00195         # Anonymous is allowed
00196         self.logout()
00197         self.failUnless(checkPerm(View, self.dir))

Here is the call graph for this function:


Member Data Documentation

Definition at line 19 of file test_folder_workflow.py.

Definition at line 29 of file test_folder_workflow.py.

Definition at line 20 of file test_folder_workflow.py.


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