Did I find the right examples for you? yes no

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

src/c/o/collective.portlet.quote-1.0.1/collective/portlet/quote/tests/test_portlet.py   collective.portlet.quote(Download)
    def test_interfaces(self):
        # TODO: Pass any keyword arguments to the Assignment constructor
        portlet = randomquote.Assignment()
        self.failUnless(IPortletAssignment.providedBy(portlet))
        self.failUnless(IPortletDataProvider.providedBy(portlet.data))
        request = self.folder.REQUEST
 
        mapping['foo'] = randomquote.Assignment()
        editview = getMultiAdapter((mapping['foo'], request), name='edit')
        self.failUnless(isinstance(editview, randomquote.EditForm))
 
        # TODO: Pass any keyword arguments to the Assignment constructor
        assignment = randomquote.Assignment()
 
        renderer = getMultiAdapter(
        # TODO: Pass any default keyword arguments to the Assignment
        # constructor.
        assignment = assignment or randomquote.Assignment()
        return getMultiAdapter((context, request, view, manager, assignment),
                               IPortletRenderer)
            context=self.portal,
            assignment=randomquote.Assignment(
                target_folder='/quotes'
            )
        )