示例#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'))
 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')