예제 #1
0
 def setUp( self ):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
     self.ttool = self.site._setObject( 'portal_types', TypesTool() )
     fti = FTIDATA_DUMMY[0].copy()
     self.ttool._setObject( 'Dummy Content', FTI(**fti) )
예제 #2
0
    def setUp(self):
        from Products.CMFUid.UniqueIdAnnotationTool \
                import UniqueIdAnnotationTool

        SecurityTest.setUp(self)
        self.root._setObject('portal_uidannotation', UniqueIdAnnotationTool())
        self.root._setObject('dummy', DummyContent(id='dummy'))
예제 #3
0
 def setUp(self):
     self._trap_warning_output()
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     sm = getSiteManager()
     sm.registerUtility(DummyTool(), IMembershipTool)
     sm.registerUtility(DummyTool().__of__(self.site), IURLTool)
예제 #4
0
    def setUp(self):
        from Products.CMFCore.PortalFolder import PortalFolderFactory

        SecurityTest.setUp(self)
        gsm = getGlobalSiteManager()
        gsm.registerUtility(PortalFolderFactory, IFactory, 'cmf.folder')
        self.site = DummySite('site').__of__(self.root)
예제 #5
0
    def setUp(self):
        SecurityTest.setUp(self)

        # setting up types tool
        getSiteManager().registerUtility(TypesTool(), ITypesTool)

        # setup portal
        try:
            self.app._delObject('test')
        except AttributeError:
            pass
        self.app._setObject('test', PortalFolder('test', ''))
        self.test = test = self.app.test

        # setting up folders
        test._setObject('folder', PortalFolder('folder', ''))
        folder = self.folder = test.folder
        folder._setObject('sub', PortalFolder('sub', ''))
        sub = self.sub = folder.sub

        #----- hacks to allow pasting (see also test_PortalFolder)
        # WAAA! force sub to allow paste of Dummy object.
        sub.all_meta_types = extra_meta_types()

        # delete items if necessary
        try:
            folder._delObject('dummy')
        except AttributeError:
            pass
        try:
            sub._delObject('dummy')
        except AttributeError:
            pass
예제 #6
0
    def setUp( self ):
        SecurityTest.setUp(self)

        root = self.root
        try: root._delObject('test')
        except AttributeError: pass
        root._setObject( 'test', PortalFolder( 'test','' ) )
예제 #7
0
    def setUp(self):
        SecurityTest.setUp(self)

        root = self.root

        # setting up types tool
        root._setObject( 'portal_types', TypesTool() )

        # setup portal
        try:
            root._delObject('test')
        except AttributeError:
            pass
        root._setObject('test', PortalFolder('test', ''))
        self.test = test = self.root.test

        # setting up folders
        test._setObject( 'folder', PortalFolder( 'folder', '' ) )
        folder = self.folder = test.folder
        folder._setObject( 'sub', PortalFolder( 'sub', '' ) )
        sub = self.sub = folder.sub

        #----- hacks to allow pasting (see also test_PortalFolder)
        # WAAA! force sub to allow paste of Dummy object.
        sub.all_meta_types = extra_meta_types()

        # delete items if necessary
        try:
            folder._delObject('dummy')
        except AttributeError:
            pass
        try:
            sub._delObject('dummy')
        except AttributeError:
            pass
    def setUp(self):
        from Products.CMFCore.CatalogTool import CatalogTool
        from Products.CMFCore.utils import registerToolInterface
        from Products.CMFUid.interfaces import IUniqueIdHandler
        from Products.CMFUid.UniqueIdAnnotationTool \
            import UniqueIdAnnotationTool
        from Products.CMFUid.UniqueIdGeneratorTool \
            import UniqueIdGeneratorTool

        SecurityTest.setUp(self)
        self.app._setObject('dummy', DummyContent(id='dummy'))
        self.app._setObject('dummy2', DummyContent(id='dummy2'))
        self.ctool = CatalogTool().__of__(self.app)
        self.uidhandler = self._makeOne()
        sm = getSiteManager()
        sm.registerUtility(self.ctool, ICatalogTool)
        registerToolInterface('portal_catalog', ICatalogTool)
        sm.registerUtility(self.uidhandler, IUniqueIdHandler)
        sm.registerUtility(UniqueIdAnnotationTool(),
                           IUniqueIdAnnotationManagement)
        sm.registerUtility(UniqueIdGeneratorTool(), IUniqueIdGenerator)
        sm.registerUtility(provided=IPortalCatalogQueueProcessor, factory=PortalCatalogProcessor)

        # Make sure we have our indices/columns
        uid_name = self.uidhandler.UID_ATTRIBUTE_NAME
        self.ctool.addIndex(uid_name, 'FieldIndex')
        self.ctool.addColumn(uid_name)
예제 #9
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site')
     sm = getSiteManager()
     self.site._setObject( 'portal_discussion', self._makeOne() )
     sm.registerUtility(self.site.portal_discussion, IDiscussionTool)
     self.site._setObject( 'portal_types', DummyTool() )
예제 #10
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_catalog', CatalogTool())
     self.root._setObject('portal_uidgenerator', UniqueIdGeneratorTool())
     self.root._setObject('portal_uidhandler', UniqueIdHandlerTool())
     self.root._setObject('dummy', DummyContent(id='dummy'))
     self.uid_attr_name = self.root.portal_uidhandler._UID_ATTRIBUTE_NAME
     setupIndexes(self.root.portal_catalog, self.uid_attr_name)
예제 #11
0
 def setUp(self):
     SecurityTest.setUp(self)
     newSecurityManager(None, DummyUser().__of__(self.app.acl_users))
     self.site = DummySite('site').__of__(self.root)
     sm = getSiteManager()
     self.site._setObject( 'portal_discussion', DiscussionTool() )
     sm.registerUtility(self.site.portal_discussion, IDiscussionTool)
     self.site._setObject( 'portal_types', TypesTool() )
예제 #12
0
    def setUp( self ):
        from Products.CMFCore.PortalFolder import PortalFolder
        SecurityTest.setUp(self)

        root = self.root
        try: root._delObject('test')
        except AttributeError: pass
        root._setObject( 'test', PortalFolder( 'test','' ) )
예제 #13
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     sm = getSiteManager()
     self.site._setObject( 'portal_discussion', DiscussionTool() )
     sm.registerUtility(self.site.portal_discussion, IDiscussionTool)
     self.site._setObject( 'portal_membership', DummyTool() )
     self.site._setObject( 'portal_types', TypesTool() )
예제 #14
0
    def setUp(self):
        from Products.CMFCore.interfaces import IPropertiesTool

        SecurityTest.setUp(self)
        self.site = PropertiedDummySite('site')
        sm = getSiteManager()
        sm.registerUtility(MailHost('MailHost'), IMailHost)
        sm.registerUtility(self._makeOne(), IPropertiesTool)
        sm.registerUtility(self.site, ISiteRoot)
예제 #15
0
    def setUp( self ):
        SecurityTest.setUp(self)

        filterwarnings('ignore', category=DeprecationWarning)
        self.site = DummySite('site').__of__(self.root)
        self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
        self.ttool = self.site._setObject( 'portal_types', TypesTool() )
        fti = FTIDATA_DUMMY[0].copy()
        self.ttool._setObject( 'Dummy Content', FTI(**fti) )
예제 #16
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = PropertiedDummySite('site')
     sm = getSiteManager()
     sm.registerUtility(self.site, ISiteRoot)
     self.site._setObject('portal_properties', self._makeOne())
     sm.registerUtility(self.site.portal_properties, IPropertiesTool)
     self.site._setObject('MailHost', MailHost('MailHost'))
     sm.registerUtility(self.site.MailHost, IMailHost)
예제 #17
0
    def setUp(self):
        SecurityTest.setUp(self)
        gsm = getGlobalSiteManager()
        gsm.provideUtility(IFactory, DummyFactory, 'test.dummy')

        self.f = DummyFolder()
        self.ti = self._makeOne('Foo', meta_type='Dummy',
                                factory='test.dummy')
        newSecurityManager(None, UserWithRoles('FooAdder').__of__(self.f))
예제 #18
0
 def setUp(self):
     SecurityTest.setUp(self)
     newSecurityManager(None, DummyUser().__of__(self.app.acl_users))
     self.site = DummySite('site').__of__(self.app)
     self.dtool = DiscussionTool()
     self.ttool = TypesTool()
     sm = getSiteManager()
     sm.registerUtility(self.dtool, IDiscussionTool)
     sm.registerUtility(self.ttool, ITypesTool)
예제 #19
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_catalog', CatalogTool())
     self.root._setObject('portal_uidgenerator', UniqueIdGeneratorTool())
     self.root._setObject('portal_uidannotation', UniqueIdAnnotationTool())
     self.root._setObject('portal_uidhandler', UniqueIdHandlerTool())
     self.root._setObject('dummy', DummyContent(id='dummy'))
     
     removeUnnecessaryIndexes(self.root.portal_catalog)
예제 #20
0
    def setUp(self):
        SecurityTest.setUp(self)
        sm = getSiteManager()
        sm.registerUtility(DummyFactory, IFactory, 'test.dummy')

        self.f = DummyFolder()
        self.ti = self._makeOne('Foo', meta_type='Dummy',
                                factory='test.dummy')
        newSecurityManager(None, UserWithRoles('FooAdder').__of__(self.f))
예제 #21
0
    def setUp(self):
        from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI

        SecurityTest.setUp(self)
        self.site = DummySite('site').__of__(self.root)
        self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
        self.ttool = self.site._setObject( 'portal_types', self._makeOne() )
        fti = FTIDATA_DUMMY[0].copy()
        self.ttool._setObject( 'Dummy Content', FTI(**fti) )
예제 #22
0
    def setUp(self):
        SecurityTest.setUp(self)
        self.root._setObject('portal_uidannotation', self._getTargetClass()())
        self.root._setObject('dummy', DummyContent(id='dummy'))

        sm = getSiteManager()
        sm.registerUtility( self.root.portal_uidannotation
                          , IUniqueIdAnnotationManagement
                          )
예제 #23
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('site', DummySite('site') )
     self.site = self.root._getOb('site')
     self.site._setObject( 'portal_types', DummyTool() )
     self.site._setObject( 'portal_workflow', WorkflowTool() )
     self._constructDummyWorkflow()
     transaction.savepoint(optimistic=True)
     newSecurityManager(None, OmnipotentUser().__of__(self.site))
예제 #24
0
    def setUp(self):
        from Products.CMFCore.interfaces import IDiscussionTool

        SecurityTest.setUp(self)
        self.site = DummySite('site')
        self.dtool = self._makeOne()
        self.ttool = DummyTool()
        sm = getSiteManager()
        sm.registerUtility(self.dtool, IDiscussionTool)
        sm.registerUtility(self.ttool, ITypesTool)
예제 #25
0
    def setUp(self):
        import Products
        from Products.CMFCore.PortalFolder import PortalFolderFactory

        SecurityTest.setUp(self)
        setUpEvents()
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('content.zcml', Products.CMFCore)
        gsm = getGlobalSiteManager()
        gsm.provideUtility(IFactory, PortalFolderFactory, 'cmf.folder')
        self.site = DummySite('site').__of__(self.root)
예제 #26
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.app._setObject('site', DummySite('site'))
     self.site = self.app._getOb('site')
     self.wtool = self.site._setObject('portal_workflow', WorkflowTool())
     self._constructDummyWorkflow()
     transaction.savepoint(optimistic=True)
     newSecurityManager(None, OmnipotentUser().__of__(self.site))
     sm = getSiteManager()
     sm.registerUtility(self.wtool, IWorkflowTool)
     sm.registerUtility(DummyTool(), ITypesTool)
예제 #27
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.app)
     ttool = TypesTool()
     fti = FTIDATA_CMF[0].copy()
     ttool._setObject( 'Dummy Content 15', FTI(**fti) )
     self.site._setObject( 'foo', DummyContent() )
     sm = getSiteManager()
     sm.registerUtility(DummyTool(), IMembershipTool)
     sm.registerUtility(DummyTool().__of__(self.site), IURLTool)
     sm.registerUtility(ttool, ITypesTool)
예제 #28
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)
예제 #29
0
 def setUp(self):
     from Products.CMFCore.CatalogTool import CatalogTool
     from Products.CMFUid.UniqueIdAnnotationTool \
             import UniqueIdAnnotationTool
     from Products.CMFUid.UniqueIdGeneratorTool \
             import UniqueIdGeneratorTool
     SecurityTest.setUp(self)
     self.root._setObject('portal_catalog', CatalogTool())
     self.root._setObject('portal_uidgenerator', UniqueIdGeneratorTool())
     self.root._setObject('portal_uidannotation', UniqueIdAnnotationTool())
     self.root._setObject('portal_uidhandler', self._getTargetClass()())
     self.root._setObject('dummy', DummyContent(id='dummy'))
     self.root._setObject('dummy2', DummyContent(id='dummy2'))
예제 #30
0
    def setUp(self):
        from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement

        SecurityTest.setUp(self)
        self.uidannotation = self._makeOne()
        sm = getSiteManager()
        sm.registerUtility(self.uidannotation, IUniqueIdAnnotationManagement)
        sm.registerUtility(DummyUniqueIdHandlerTool(), IUniqueIdHandler)

        self.app._setObject('dummy', DummyContent(id='dummy'))
        self.app._setObject('site', Folder('site'))

        transaction.savepoint(optimistic=True)
예제 #31
0
 def tearDown(self):
     SecurityTest.tearDown(self)
     FSPTMaker.tearDown(self)
예제 #32
0
 def tearDown(self):
     SecurityTest.tearDown(self)
     FSDTMLMaker.tearDown(self)
예제 #33
0
    def tearDown(self):
        del filters[0]

        SecurityTest.tearDown(self)
예제 #34
0
 def tearDown(self):
     from zope.testing.cleanup import cleanUp
     cleanUp()
     SecurityTest.tearDown(self)
예제 #35
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
예제 #36
0
 def tearDown(self):
     cleanUp()
     SecurityTest.tearDown(self)
     FSPTMaker.tearDown(self)
예제 #37
0
 def tearDown(self):
     cleanUp()
     SecurityTest.tearDown(self)
예제 #38
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.site._setObject('portal_membership', self._makeOne())
예제 #39
0
 def tearDown(self):
     SecurityTest.tearDown(self)
     FSZSQLMaker.tearDown(self)
예제 #40
0
 def tearDown(self):
     cleanUp()
     FSReSTMaker.tearDown(self)
     SecurityTest.tearDown(self)
예제 #41
0
 def setUp(self):
     SecurityTest.setUp(self)
     FSPSMaker.setUp(self)
     self._trap_warning_output()
예제 #42
0
 def tearDown(self):
     self._free_warning_output()
     FSPSMaker.tearDown(self)
     SecurityTest.tearDown(self)
예제 #43
0
 def setUp(self):
     FSPSMaker.setUp(self)
     SecurityTest.setUp(self)
예제 #44
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.site._setObject('portal_discussion', DiscussionTool())
     self.site._setObject('portal_membership', DummyTool())
     self.site._setObject('portal_types', TypesTool())
예제 #45
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.mtool = MembershipTool().__of__(self.site)
예제 #46
0
 def setUp(self):
     FSDVTest.setUp(self)
     SecurityTest.setUp(self)
예제 #47
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('site', DummySite('site'))
     self.site = self.root.site
예제 #48
0
 def tearDown(self):
     SecurityTest.tearDown(self)
     FSDVTest.tearDown(self)
예제 #49
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_uidgenerator', self._getTargetClass()())
예제 #50
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_uidannotation', self._getTargetClass()())
     self.root._setObject('dummy', DummyContent(id='dummy'))
예제 #51
0
 def tearDown(self):
     cleanUp()
     FSSTXMaker.tearDown(self)
     SecurityTest.tearDown(self)
     _TemplateSwitcher.tearDown(self)
예제 #52
0
 def xxx_setUp(self):
     SecurityTest.setUp(self)
예제 #53
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.site._setObject( 'acl_users', DummyUserFolder() )
     self.site._setObject('content_dummy', DummyObject(id='content_dummy'))
     self.site._setObject('actions_dummy', DummyObject(id='actions_dummy'))
예제 #54
0
 def tearDown(self):
     SecurityTest.tearDown(self)
     self._free_warning_output()
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.app)
     sm = getSiteManager()
     sm.registerUtility(DummyMembershipTool(), IMembershipTool)
예제 #56
0
 def setUp(self):
     FSPTMaker.setUp(self)
     SecurityTest.setUp(self)
     self.skins, self.custom, self.fsdir, self.fsPT = self._makeContext(
         'testPT', 'testPT.pt')