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

All Samples(12)  |  Call(12)  |  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))
 
 
        self.assertEquals(len(mapping), 1)
        self.failUnless(isinstance(mapping.values()[0], bling.Assignment))
 
    def testInvokeEditView(self):
        mapping['foo'] = bling.Assignment(u'Blingy', u'/news', u'thumb', True, u'Random', u'default')
        editview = getMultiAdapter((mapping['foo'], request), name='edit')
        self.failUnless(isinstance(editview, bling.EditForm))
 
    def testRenderer(self):
 
        renderer = getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
        self.failUnless(isinstance(renderer, bling.Renderer))
 
 

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))
 
 
        self.assertEquals(len(mapping), 1)
        self.failUnless(isinstance(mapping.values()[0], bling.SlideshowAssignment))
 
    def testInvokeEditView(self):
        mapping['foo'] = bling.SlideshowAssignment(u'Blingy', u'/news', u'thumb', True, 5000, u'Random', True, 80, u'default')
        editview = getMultiAdapter((mapping['foo'], request), name='edit')
        self.failUnless(isinstance(editview, bling.SlideshowEditForm))
 
    def testRenderer(self):
 
        renderer = getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
        self.failUnless(isinstance(renderer, bling.SlideshowRenderer))
 
class TestRenderer(TestCase):