Ignore:
Timestamp:
Apr 20, 2012 10:04:56 AM (12 years ago)
Author:
potar
Message:

Merged tests branch

Location:
quintagroup.plonetabs/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonetabs/trunk

    • Property svn:mergeinfo
      •  

        old new  
        11/quintagroup.plonetabs/branches/plone4:3076-3243 
         2/quintagroup.plonetabs/branches/tests:3394-3436 
  • quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_erase.py

    r872 r3437  
    66from Testing import ZopeTestCase as ztc 
    77 
    8 from zope.component import getSiteManager 
     8from zope.app.component.hooks import setHooks, setSite 
    99 
    1010from plone.browserlayer.utils import registered_layers 
     
    1414 
    1515from quintagroup.plonetabs.tests.base import PloneTabsTestCase 
     16 
    1617 
    1718class TestErase(PloneTabsTestCase): 
     
    2324        @classmethod 
    2425        def setUp(cls): 
     26 
    2527            app = ztc.app() 
    2628            portal = app.plone 
     29 
     30            # change the active local site manager 
     31            setHooks() 
     32            setSite(portal) 
    2733 
    2834            # elevate permissions 
     
    3339            product_name = 'quintagroup.plonetabs' 
    3440            if tool.isProductInstalled(product_name): 
    35                 tool.uninstallProducts([product_name,]) 
     41                tool.uninstallProducts([product_name, ]) 
    3642 
    3743            # drop elevated perms 
     
    4349    def afterSetUp(self): 
    4450        self.loginAsPortalOwner() 
    45      
     51 
    4652    def test_actionIcons(self): 
    4753        tool = getToolByName(self.portal, 'portal_actionicons') 
     
    4955        self.failIf('plonetabs' in icon_ids, 
    5056            'There should be no plonetabs action icon after uninstall.') 
    51      
     57 
    5258    def test_controlPanel(self): 
    5359        tool = getToolByName(self.portal, 'portal_controlpanel') 
     
    5561        self.failIf('plonetabs' in action_ids, 
    5662            'There should be no plonetabs configlet after after uninstall.') 
    57      
     63 
    5864    def test_cssRegistry(self): 
    5965        tool = getToolByName(self.portal, 'portal_css') 
     
    6268            'There should be no ++resource++plonetabs.css stylesheets after' 
    6369            ' uninstall.') 
    64      
     70 
    6571    def test_jsRegistry(self): 
    6672        tool = getToolByName(self.portal, 'portal_javascripts') 
    67          
     73 
    6874        effects = tool.getResource('++resource++pt_effects.js') 
    6975        self.failUnless(effects is None, 
    7076            'There should be no ++resource++pt_effects.js script after' 
    7177            ' uninstall.') 
    72          
     78 
    7379        dad = tool.getResource('++resource++sa_dragdrop.js') 
    7480        self.failUnless(dad is None, 
     
    8692            'There should be no ++resource++plonetabsmode.kss sheets after' 
    8793            ' uninstall.') 
    88      
     94 
    8995    def test_propertiesTool(self): 
    9096        tool = getToolByName(self.portal, 'portal_properties') 
     
    99105            ' after uninstall.' 
    100106        ) 
    101      
     107 
    102108    def test_browserLayer(self): 
    103         sm = getSiteManager(self.portal) 
    104109        layers = [o.__name__ for o in registered_layers()] 
    105110        self.failIf('IPloneTabsProductLayer' in layers, 
    106111            'There should be no quintagroup.plonetabs layer after uninstall.') 
     112 
    107113 
    108114def test_suite(): 
Note: See TracChangeset for help on using the changeset viewer.