Exemplo n.º 1
0
    def setUp(self):
        SecurityRequestTest.setUp(self)

        root = self.root
        root._setObject( 'portal_actions', self._makeOne() )
        root._setObject( 'portal_url', URLTool() )
        root._setObject( 'foo', URLTool() )
        root._setObject('portal_membership', MembershipTool())
        self.tool = root.portal_actions
        self.tool.action_providers = ('portal_actions',)
Exemplo n.º 2
0
    def setUp(self):
        from Products.CMFCore.interfaces import IActionsTool

        SecurityTest.setUp(self)
        self.tool = self._makeOne()
        self.tool.action_providers = ('portal_actions', )
        self.app._setObject('foo', URLTool())
        sm = getSiteManager()
        sm.registerUtility(self.tool, IActionsTool)
        sm.registerUtility(MembershipTool(), IMembershipTool)
        sm.registerUtility(self.app, ISiteRoot)
        sm.registerUtility(URLTool(), IURLTool)
Exemplo n.º 3
0
    def setUp(self):
        SecurityRequestTest.setUp(self)

        root = self.root
        sm = getSiteManager()
        sm.registerUtility(root, ISiteRoot)
        root._setObject('portal_actions', self._makeOne())
        root._setObject('portal_url', URLTool())
        root._setObject('foo', URLTool())
        root._setObject('portal_membership', MembershipTool())
        self.tool = root.portal_actions
        self.tool.action_providers = ('portal_actions', )
Exemplo n.º 4
0
    def setUp(self):

        SecurityRequestTest.setUp(self)

        root = self.root
        root._setObject('portal_actions', ActionsTool())
        root._setObject('foo', URLTool())
        root._setObject('bar', URLTool())
        root._setObject('portal_membership', MembershipTool())
        root._setObject('portal_types', TypesTool())
        self.tool = root.portal_actions
        self.ut = root.foo
        self.tool.action_providers = ('portal_actions', )
Exemplo n.º 5
0
 def setUp(self):
     f1 = Folder()
     f1.id = 'f1'
     self.f1 = f1
     f2 = Folder()
     f2.id = 'f2'
     self.f1.f2 = f2
     f3 = Folder()
     f3.id = 'f3'
     self.f1.f2.f3 = f3
     f4 = Folder()
     f4.id = 'f4'
     self.f1.f2.f4 = f4
     f4_1 = Folder()
     f4_1.id = 'f4'
     self.f1.f4 = f4_1
     f1.portal_url = URLTool()
     f1.refs = ReferenceCollection()
Exemplo n.º 6
0
 def setUp( self ):
     
     SecurityTest.setUp(self)
     
     root = self.root
     root._setObject( 'portal_discussion', DiscussionTool() )
     self.discussion_tool = root.portal_discussion
     root._setObject( 'portal_catalog', CatalogTool() )
     self.catalog_tool = root.portal_catalog
     root._setObject( 'portal_url', URLTool() )
     self.url_tool = root.portal_url
     root._setObject( 'portal_workflow', WorkflowTool() ) 
     self.workflow_tool = root.portal_workflow
     root._setObject( 'portal_types', TypesTool() )
     types_tool = self.types_tool = root.portal_types
     try: root._delObject('test')
     except AttributeError: pass
     root._setObject( 'test', DummyContent( 'test', catalog=1 ) )
Exemplo n.º 7
0
    def _makeOne(self, *args, **kw):
        from Products.CMFCore.URLTool import URLTool

        url_tool = URLTool(*args, **kw)
        return url_tool.__of__(self.site)
Exemplo n.º 8
0
 def _makeOne(self, *args, **kw):
     url_tool = URLTool(*args, **kw)
     return url_tool.__of__( self.site )
Exemplo n.º 9
0
    def _makeOne(self, *args, **kw):
        from Products.CMFCore.URLTool import URLTool

        url_tool = URLTool(*args, **kw)
        return url_tool.__of__(self.site)
Exemplo n.º 10
0
 def _makeOne(self, *args, **kw):
     url_tool = URLTool(*args, **kw)
     return url_tool.__of__(self.site)