Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/p/r/Products.BlingPortlet-2.1/Products/BlingPortlet/tests/test_bling_portlet.py   Products.BlingPortlet(Download)
    def testInterfaces(self):
        portlet = bling.Assignment(u'Blingy', u'/news', u'thumb', True, u'Random', u'default')
        self.failUnless(IPortletAssignment.providedBy(portlet))
        self.failUnless(IPortletDataProvider.providedBy(portlet.data))
 
    def testInvokeEditView(self):
        mapping = PortletAssignmentMapping()
        request = self.folder.REQUEST
 
        mapping['foo'] = bling.Assignment(u'Blingy', u'/news', u'thumb', True, u'Random', u'default')
        self.folder.invokeFactory('Document', id='doc')
 
        assignment = bling.Assignment(u'Blingy', folderpath, u'thumb', True, u'Random', u'default')
 
        renderer = getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
        view = view or self.folder.restrictedTraverse('@@plone')
        manager = manager or getUtility(IPortletManager, name='plone.rightcolumn', context=self.portal)
        assignment = assignment or bling.Assignment(u'Blingy', u'/news', u'thumb', True, u'Random', u'default')
 
        return getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
        self.portal.portal_workflow.doActionFor(self.folder, 'publish')
        fpath = '/'+'/'.join(self.folder.getPhysicalPath()[-2:])
        r = self.renderer(context=self.portal, assignment=bling.Assignment(bling_title, fpath, u'thumb', True, u'Random', u'default'))
        r = r.__of__(self.folder)
        r.update()