Python IRightColumn Example

Introduction

The python irightcolumn example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: Python

Namespace/package name: ploneappportletsinterfaces

Example#1
File: test_setup.pyProject: headnet/plone.app.portlets

    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))

Example#2
File: test_setup.pyProject: collective/collective.personalportletcolumn

    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))