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

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

src/p/r/Products.BlingPortlet-2.1/Products/BlingPortlet/tests/test_bling_slideshow_portlet.py   Products.BlingPortlet(Download)
    def testInterfaces(self):
        portlet = bling.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, 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.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, u'default')
        view = self.folder.restrictedTraverse('@@plone')
        manager = getUtility(IPortletManager, name='plone.rightcolumn', context=self.portal)
        assignment = bling.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, 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.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, u'default')
 
        return getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
 
    def test_render(self):
        r = self.renderer(context=self.portal, assignment=bling.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, u'default'))