Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFEditions.tests.test_CopyModifyMergeRepositoryTool.TestRegressionTests Class Reference

List of all members.

Public Member Functions

def afterSetUp
def test_idModification

Private Member Functions

def _setupArchivist

Detailed Description

Definition at line 351 of file test_CopyModifyMergeRepositoryTool.py.


Member Function Documentation

Definition at line 366 of file test_CopyModifyMergeRepositoryTool.py.

00366 
00367     def _setupArchivist(self):
00368         # override this to install a different than the "official" tools
00369         pass

Here is the caller graph for this function:

Definition at line 353 of file test_CopyModifyMergeRepositoryTool.py.

00353 
00354     def afterSetUp(self):
00355         # we need to have the Manager role to be able to add things
00356         # to the portal root
00357         self.setRoles(['Manager',])
00358         self.portal.acl_users.userFolderAddUser('reviewer', 'reviewer',
00359                                                 ['Manager'], '')
00360 
00361         self.portal.invokeFactory('Document', 'doc')
00362         self.portal.invokeFactory('Folder', 'fol')
00363 
00364         # add the Editions Tool (this way we test the 'Install' script!)
00365         self._setupArchivist()

Here is the call graph for this function:

Definition at line 370 of file test_CopyModifyMergeRepositoryTool.py.

00370 
00371     def test_idModification(self):
00372         portal_repository = self.portal.portal_repository
00373         portal_archivist = self.portal.portal_archivist
00374         doc = self.portal.doc
00375         doc.text = 'text v1'
00376         portal_repository.applyVersionControl(doc, comment='save no 1')
00377         doc.text = 'text v2'
00378         transaction.savepoint(optimistic=True)
00379         self.portal.manage_renameObject(doc.getId(), 'newdoc',)
00380         portal_repository.save(doc, comment='save no 2')
00381         portal_repository.revert(doc, 0)
00382         self.assertEqual(doc.getId(), 'newdoc')
00383         self.failUnless('newdoc' in self.portal.objectIds())


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