Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFQuickInstallerTool.tests.testSetup.TestInstalledProduct Class Reference

List of all members.

Public Member Functions

def afterSetUp
def testSlotsMigration

Public Attributes

 qi

Detailed Description

Definition at line 40 of file testSetup.py.


Member Function Documentation

Definition at line 42 of file testSetup.py.

00042 
00043     def afterSetUp(self):
00044         self.setRoles(['Manager'])
00045         self.addProduct('CMFQuickInstallerTool')
00046         self.qi = getattr(self.portal, 'portal_quickinstaller', None)

Here is the call graph for this function:

Definition at line 47 of file testSetup.py.

00047 
00048     def testSlotsMigration(self):
00049         # leftslots and rightslots have been class variables ones. Make sure
00050         # using old instances without these properties doesn't break.
00051 
00052         # New instances should have the properties
00053         new = InstalledProduct('new')
00054         self.failUnless(hasattr(new, 'leftslots'))
00055         self.failUnless(hasattr(new, 'rightslots'))
00056 
00057         # Now emulate an old instance
00058         old = InstalledProduct('old')
00059         del(old.leftslots)
00060         del(old.rightslots)
00061 
00062         # Make sure calling the API will give you no error but silently
00063         # add the property
00064         left = old.getLeftSlots()
00065         self.failUnless(left == [])
00066         self.failUnless(old.leftslots == [])
00067 
00068         right = old.getRightSlots()
00069         self.failUnless(right == [])
00070         self.failUnless(old.rightslots == [])
00071 
00072         slots = old.getSlots()
00073         self.failUnless(slots == [])
00074 


Member Data Documentation

Definition at line 45 of file testSetup.py.


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