Changeset 1835 in products


Ignore:
Timestamp:
Feb 26, 2010 3:54:31 PM (14 years ago)
Author:
mylan
Message:

#161: Split installation and uninstallation tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py

    r1834 r1835  
    77 
    88 
    9 class TestBeforeInstall(FunctionalTestCase): 
     9class TestBeforeInstallation(FunctionalTestCase): 
    1010 
    1111    def afterSetUp(self): 
     12        self.qi = self.portal.portal_quickinstaller 
     13        self.qi.uninstallProducts([PROJECT_NAME]) 
    1214        self.basic_auth = 'mgr:mgrpw' 
    1315        self.portal_path = '/%s' % self.portal.absolute_url(1) 
     
    2628    def afterSetUp(self): 
    2729        self.properties = getToolByName(self.portal, 'portal_properties') 
    28         self.qi = self.portal.portal_quickinstaller 
    2930 
    3031    def testAddingPropertySheet(self): 
     
    6061                self.assert_(PROJECT_NAME+'/%s' % plone_version in path, 'qSEOptimizer versioned layer not found in %s' %skin) 
    6162 
     63 
     64 
     65class TestUninstallation(TestCase): 
     66 
     67    def afterSetUp(self): 
     68        self.qi = self.portal.portal_quickinstaller 
     69        self.qi.uninstallProducts([PROJECT_NAME]) 
     70 
    6271    def test_skins_uninstall(self): 
    63         self.qi.uninstallProducts([PROJECT_NAME]) 
    6472        self.assertNotEqual(self.qi.isProductInstalled(PROJECT_NAME), True,'qSEOptimizer is already installed') 
    6573        skinstool=getToolByName(self.portal, 'portal_skins') 
     
    7179 
    7280    def test_versionedskin_uninstall(self): 
    73         self.qi.uninstallProducts([PROJECT_NAME]) 
    7481        self.assertNotEqual(self.qi.isProductInstalled(PROJECT_NAME), True,'qSEOptimizer is already installed') 
    7582        skinstool=getToolByName(self.portal, 'portal_skins') 
     
    8390 
    8491    def test_configlet_uninstall(self): 
    85         self.qi.uninstallProducts([PROJECT_NAME]) 
    8692        self.assertNotEqual(self.qi.isProductInstalled(PROJECT_NAME), True,'qSEOptimizer is already installed') 
    8793 
     
    8995        self.assert_(not PROJECT_NAME in [a.getId() for a in configTool.listActions()], 'Configlet found after uninstallation') 
    9096 
     97 
     98 
    9199def test_suite(): 
    92100    from unittest import TestSuite, makeSuite 
    93101    suite = TestSuite() 
    94     suite.addTest(makeSuite(TestBeforeInstall)) 
     102    suite.addTest(makeSuite(TestBeforeInstallation)) 
    95103    suite.addTest(makeSuite(TestInstallation)) 
     104    suite.addTest(makeSuite(TestUninstallation)) 
    96105    return suite 
Note: See TracChangeset for help on using the changeset viewer.