def testInterfaces(self): left = getUtility(IPortletManager, 'plone.leftcolumn') right = getUtility(IPortletManager, 'plone.rightcolumn') dashboard = getUtility(IPortletManager, 'plone.dashboard1') self.assertTrue(ILeftColumn.providedBy(left)) self.assertTrue(IRightColumn.providedBy(right)) self.assertTrue(IDashboard.providedBy(dashboard))
def testPortletManagersRegistered(self): right = getUtility(IPortletManager, 'plone.rightcolumn') self.failUnless(IRightColumn.providedBy(right)) self.failIf(IPersonalPortletManager.providedBy(right)) # Install it self.addProfile('collective.personalportletcolumn:default') right = getUtility(IPortletManager, 'plone.rightcolumn') self.failIf(IRightColumn.providedBy(right)) self.failUnless(IPersonalPortletManager.providedBy(right)) # Unistall it self.addProfile('collective.personalportletcolumn:uninstall') right = getUtility(IPortletManager, 'plone.rightcolumn') self.failUnless(IRightColumn.providedBy(right)) self.failIf(IPersonalPortletManager.providedBy(right))