Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
CMFDefault.tests.test_Image.TestImageCopyPaste Class Reference

List of all members.

Public Member Functions

def afterSetUp
def test_File_CopyPasteResetsWorkflowState
def test_File_CloneResetsWorkflowState
def test_File_CutPasteKeepsWorkflowState
def test_File_RenameKeepsWorkflowState
def test_Image_CopyPasteResetsWorkflowState
def test_Image_CloneResetsWorkflowState
def test_Image_CutPasteKeepsWorkflowState
def test_Image_RenameKeepsWorkflowState

Public Attributes

 site
 subfolder
 workflow

Static Public Attributes

 layer = FunctionalLayer

Detailed Description

Definition at line 116 of file test_Image.py.


Member Function Documentation

Definition at line 123 of file test_Image.py.

00123 
00124     def afterSetUp(self):
00125         setSite(self.app.site)
00126         newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
00127 
00128         self.site = self.app.site
00129         self.site.invokeFactory('File', id='file')
00130         self.site.portal_workflow.doActionFor(self.site.file, 'publish')
00131         self.site.invokeFactory('Image', id='image')
00132         self.site.portal_workflow.doActionFor(self.site.image, 'publish')
00133         self.site.invokeFactory('Folder', id='subfolder')
00134         self.subfolder = self.site.subfolder
00135         self.workflow = self.site.portal_workflow
00136         transaction.commit() # Make sure we have _p_jars

Definition at line 144 of file test_Image.py.

00144 
00145     def test_File_CloneResetsWorkflowState(self):
00146         # Cloning a File should reset wf state to private
00147         self.subfolder.manage_clone(self.site.file, 'file')
00148         review_state = self.workflow.getInfoFor(self.subfolder.file, 'review_state')
00149         self.assertEqual(review_state, 'private')

Definition at line 137 of file test_Image.py.

00137 
00138     def test_File_CopyPasteResetsWorkflowState(self):
00139         # Copy/pasting a File should reset wf state to private
00140         cb = self.site.manage_copyObjects(['file'])
00141         self.subfolder.manage_pasteObjects(cb)
00142         review_state = self.workflow.getInfoFor(self.subfolder.file, 'review_state')
00143         self.assertEqual(review_state, 'private')

Definition at line 150 of file test_Image.py.

00150 
00151     def test_File_CutPasteKeepsWorkflowState(self):
00152         # Cut/pasting a File should keep the wf state
00153         cb = self.site.manage_cutObjects(['file'])
00154         self.subfolder.manage_pasteObjects(cb)
00155         review_state = self.workflow.getInfoFor(self.subfolder.file, 'review_state')
00156         self.assertEqual(review_state, 'published')

Definition at line 157 of file test_Image.py.

00157 
00158     def test_File_RenameKeepsWorkflowState(self):
00159         # Renaming a File should keep the wf state
00160         self.site.manage_renameObjects(['file'], ['file2'])
00161         review_state = self.workflow.getInfoFor(self.site.file2, 'review_state')
00162         self.assertEqual(review_state, 'published')

Definition at line 170 of file test_Image.py.

00170 
00171     def test_Image_CloneResetsWorkflowState(self):
00172         # Cloning an Image should reset wf state to private
00173         self.subfolder.manage_clone(self.site.image, 'image')
00174         review_state = self.workflow.getInfoFor(self.subfolder.image, 'review_state')
00175         self.assertEqual(review_state, 'private')

Definition at line 163 of file test_Image.py.

00163 
00164     def test_Image_CopyPasteResetsWorkflowState(self):
00165         #  Copy/pasting an Image should reset wf state to private
00166         cb = self.site.manage_copyObjects(['image'])
00167         self.subfolder.manage_pasteObjects(cb)
00168         review_state = self.workflow.getInfoFor(self.subfolder.image, 'review_state')
00169         self.assertEqual(review_state, 'private')

Definition at line 176 of file test_Image.py.

00176 
00177     def test_Image_CutPasteKeepsWorkflowState(self):
00178         # Cut/pasting an Image should keep the wf state
00179         cb = self.site.manage_cutObjects(['image'])
00180         self.subfolder.manage_pasteObjects(cb)
00181         review_state = self.workflow.getInfoFor(self.subfolder.image, 'review_state')
00182         self.assertEqual(review_state, 'published')

Definition at line 183 of file test_Image.py.

00183 
00184     def test_Image_RenameKeepsWorkflowState(self):
00185         # Renaming an Image should keep the wf state
00186         self.site.manage_renameObjects(['image'], ['image2'])
00187         review_state = self.workflow.getInfoFor(self.site.image2, 'review_state')
00188         self.assertEqual(review_state, 'published')
00189 


Member Data Documentation

Definition at line 121 of file test_Image.py.

Definition at line 127 of file test_Image.py.

Definition at line 133 of file test_Image.py.

Definition at line 134 of file test_Image.py.


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