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/c/o/collective.geo.flexitopic-0.5/collective/geo/flexitopic/tests/test_fleximapportlet.py   collective.geo.flexitopic(Download)
    def test_interfaces(self):
        # TODO: Pass any keywoard arguments to the Assignment constructor
        portlet = fleximapportlet.Assignment()
        self.failUnless(IPortletAssignment.providedBy(portlet))
        self.failUnless(IPortletDataProvider.providedBy(portlet.data))
 
        self.assertEquals(len(mapping), 1)
        self.failUnless(isinstance(mapping.values()[0], fleximapportlet.Assignment))
 
    # NOTE: This test can be removed if the portlet has no edit form
        mapping['foo'] = fleximapportlet.Assignment()
        editview = getMultiAdapter((mapping['foo'], request), name='edit')
        self.failUnless(isinstance(editview, fleximapportlet.EditForm))
 
    def test_obtain_renderer(self):
 
        renderer = getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)
        self.failUnless(isinstance(renderer, fleximapportlet.Renderer))