Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testMigrationTool.TestMigrationTool Class Reference
Inheritance diagram for CMFPlone.tests.testMigrationTool.TestMigrationTool:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testMigrationTool.TestMigrationTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testMigrationFinished
def testMigrationNeedsUpgrading
def testMigrationNeedsUpdateRole
def testMigrationNeedsRecatalog
def testForceMigrationFromUnsupportedVersion
def testForceMigration
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 migration

Detailed Description

Definition at line 9 of file testMigrationTool.py.


Member Function Documentation

Definition at line 11 of file testMigrationTool.py.

00011 
00012     def afterSetUp(self):
00013         self.migration = getToolByName(self, "portal_migration")

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 38 of file testMigrationTool.py.

00038 
00039     def testForceMigration(self):
00040         self.setRoles(['Manager'])
00041         # Make sure we don't embarrass ourselves again...
00042         version = '2.1'
00043         while version is not None:
00044             version, msg = self.migration._upgrade(version)
00045         expect = 'Migration completed at version %s.' % \
00046                  self.migration.getFileSystemVersion()
00047         self.assertEqual(msg[0], expect)
00048 

Here is the call graph for this function:

Definition at line 31 of file testMigrationTool.py.

00031 
00032     def testForceMigrationFromUnsupportedVersion(self):
00033         version = '2.0.5'
00034         while version is not None:
00035             version, msg = self.migration._upgrade(version)
00036         expect = 'Migration stopped at version 2.0.5.'
00037         self.assertEqual(msg[0], expect)

Definition at line 14 of file testMigrationTool.py.

00014 
00015     def testMigrationFinished(self):
00016         self.assertEqual(self.migration.getInstanceVersion(),
00017                          self.migration.getFileSystemVersion(),
00018                          'Migration failed')

Definition at line 27 of file testMigrationTool.py.

00027 
00028     def testMigrationNeedsRecatalog(self):
00029         self.failIf(self.migration.needRecatalog(),
00030                     'Migration needs recataloging')

Definition at line 23 of file testMigrationTool.py.

00023 
00024     def testMigrationNeedsUpdateRole(self):
00025         self.failIf(self.migration.needUpdateRole(),
00026                     'Migration needs role update')

Definition at line 19 of file testMigrationTool.py.

00019 
00020     def testMigrationNeedsUpgrading(self):
00021         self.failIf(self.migration.needUpgrading(),
00022                     'Migration needs upgrading')


Member Data Documentation

Definition at line 12 of file testMigrationTool.py.


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