Exemplo n.º 1
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
Exemplo n.º 2
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() )
Exemplo n.º 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)
Exemplo n.º 4
0
    def setUp( self ):
        SecurityTest.setUp(self)

        root = self.root
        try: root._delObject('test')
        except AttributeError: pass
        root._setObject( 'test', PortalFolder( 'test','' ) )
Exemplo n.º 5
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
Exemplo n.º 6
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)
Exemplo n.º 7
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) )
Exemplo n.º 8
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'))
    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)
Exemplo n.º 10
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','' ) )
Exemplo n.º 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() )
Exemplo n.º 12
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() )
Exemplo n.º 13
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)
Exemplo n.º 14
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)
Exemplo n.º 15
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)
Exemplo n.º 16
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)
Exemplo n.º 17
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) )
Exemplo n.º 18
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))
Exemplo n.º 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)
Exemplo n.º 20
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))
Exemplo n.º 21
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))
Exemplo n.º 22
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) )
Exemplo n.º 23
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
                          )
Exemplo n.º 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)
Exemplo n.º 25
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)
Exemplo n.º 26
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)
Exemplo n.º 27
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)
Exemplo n.º 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)
Exemplo n.º 29
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)
Exemplo n.º 30
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'))
Exemplo n.º 31
0
    def setUp( self ):
        from Products.CMFCore.PortalFolder import PortalFolder
        SecurityTest.setUp( self )

        self.root._setObject( 'portal_types', TypesTool() )
        types_tool = self.root.portal_types
        types_tool._setObject( 'Folder'
                             , FTI( id='Folder'
                                  , title='Folder or Directory'
                                  , meta_type=PortalFolder.meta_type
                                  , product='CMFCore'
                                  , factory='manage_addPortalFolder'
                                  , filter_content_types=0
                                  )
                             )
        fti = FTIDATA_DUMMY[0].copy()
        types_tool._setObject( 'Dummy Content', FTI(**fti) )
Exemplo n.º 32
0
    def setUp(self):
        FSDTMLMaker.setUp(self)
        SecurityTest.setUp(self)

        self.root._setObject('portal_skins', Folder('portal_skins'))
        self.skins = self.root.portal_skins

        self.skins._setObject('custom', Folder('custom'))
        self.custom = self.skins.custom

        self.skins._setObject('fsdir', Folder('fsdir'))
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject('testDTML',
                              self._makeOne('testDTML', 'testDTML.dtml'))

        self.fsDTML = self.fsdir.testDTML
Exemplo n.º 33
0
    def setUp(self):
        FSPTMaker.setUp(self)
        SecurityTest.setUp(self)

        self.root._setObject( 'portal_skins', Folder( 'portal_skins' ) )
        self.skins = self.root.portal_skins

        self.skins._setObject( 'custom', Folder( 'custom' ) )
        self.custom = self.skins.custom

        self.skins._setObject( 'fsdir', Folder( 'fsdir' ) )
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject( 'testPT'
                             , self._makeOne( 'testPT', 'testPT.pt' ) )

        self.fsPT = self.fsdir.testPT
Exemplo n.º 34
0
    def setUp(self):
        FSPTMaker.setUp(self)
        SecurityTest.setUp(self)

        self.root._setObject('portal_skins', Folder('portal_skins'))
        self.skins = self.root.portal_skins
        sm = getSiteManager()
        sm.registerUtility(self.skins, ISkinsTool)

        self.skins._setObject('custom', Folder('custom'))
        self.custom = self.skins.custom

        self.skins._setObject('fsdir', Folder('fsdir'))
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject('testPT', self._makeOne('testPT', 'testPT.pt'))

        self.fsPT = self.fsdir.testPT
Exemplo n.º 35
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', Document( 'test' ) )
Exemplo n.º 36
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'))

        sm = getSiteManager()
        sm.registerUtility(self.root.portal_uidannotation,
                           IUniqueIdAnnotationManagement)
        sm.registerUtility(self.root.portal_uidgenerator, IUniqueIdGenerator)
Exemplo n.º 37
0
    def setUp(self):
        from OFS.Folder import Folder

        SecurityTest.setUp(self)
        FSReSTMaker.setUp(self)

        self.root._setObject('portal_skins', Folder('portal_skins'))
        self.skins = self.root.portal_skins

        self.skins._setObject('custom', Folder('custom'))
        self.custom = self.skins.custom

        self.skins._setObject('fsdir', Folder('fsdir'))
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject('testReST',
                              self._makeOne('testReST', 'testReST.rst'))

        self.fsReST = self.fsdir.testReST
Exemplo n.º 38
0
    def setUp(self):
        from OFS.Folder import Folder

        _TemplateSwitcher.setUp(self)
        SecurityTest.setUp(self)
        FSSTXMaker.setUp(self)

        self.root._setObject('portal_skins', Folder('portal_skins'))
        self.skins = self.root.portal_skins

        self.skins._setObject('custom', Folder('custom'))
        self.custom = self.skins.custom

        self.skins._setObject('fsdir', Folder('fsdir'))
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject('testSTX', self._makeOne('testSTX',
                                                       'testSTX.stx'))

        self.fsSTX = self.fsdir.testSTX
Exemplo n.º 39
0
    def setUp(self):
        from Products.CMFCore.PortalFolder import PortalFolder

        SecurityTest.setUp(self)
        sm = getSiteManager()
        sm.registerUtility(self._getTargetObject(), IFactory, 'cmf.folder')
        self.site = DummySite('site').__of__(self.root)
        acl_users = self.site._setObject('acl_users', DummyUserFolder())
        newSecurityManager(None, acl_users.all_powerful_Oz)

        ttool = self.site._setObject('portal_types', TypesTool())
        ttool._setObject(self._PORTAL_TYPE,
                         FTI(id=self._PORTAL_TYPE,
                             title='Folder or Directory',
                             meta_type=PortalFolder.meta_type,
                             factory='cmf.folder',
                             filter_content_types=0))
        ttool._setObject('Dummy Content', FTI(**FTIDATA_DUMMY[0].copy()))

        self.f = self.site._setObject('container', PortalFolder('container'))
        self.f._setPortalTypeName(self._PORTAL_TYPE)
Exemplo n.º 40
0
    def setUp(self):
        from OFS.Folder import Folder

        SecurityTest.setUp(self)
        FSReSTMaker.setUp(self)

        self.root._setObject('portal_skins', Folder('portal_skins'))
        self.skins = self.root.portal_skins
        sm = getSiteManager()
        sm.registerUtility(self.skins, ISkinsTool)

        self.skins._setObject('custom', Folder('custom'))
        self.custom = self.skins.custom

        self.skins._setObject('fsdir', Folder('fsdir'))
        self.fsdir = self.skins.fsdir

        self.fsdir._setObject('testReST',
                              self._makeOne('testReST', 'testReST.rst'))

        self.fsReST = self.fsdir.testReST
Exemplo n.º 41
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'))

        sm = getSiteManager()
        sm.registerUtility(self.root.portal_uidannotation,
                           IUniqueIdAnnotationManagement)
        sm.registerUtility(self.root.portal_uidgenerator, IUniqueIdGenerator)

        # Make sure we have our indices/columns
        uid_name = self.root.portal_uidhandler.UID_ATTRIBUTE_NAME
        self.root.portal_catalog.addIndex(uid_name, 'FieldIndex')
        self.root.portal_catalog.addColumn(uid_name)
Exemplo n.º 42
0
    def setUp(self):
        SecurityTest.setUp(self)

        root = self.root
        sm = getSiteManager()

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

        # 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
Exemplo n.º 43
0
    def setUp(self):
        from Products.CMFCore.CatalogTool import CatalogTool
        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)
        sm.registerUtility(self.uidhandler, IUniqueIdHandler)
        sm.registerUtility(UniqueIdAnnotationTool(),
                           IUniqueIdAnnotationManagement)
        sm.registerUtility(UniqueIdGeneratorTool(), IUniqueIdGenerator)

        # 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)
Exemplo n.º 44
0
 def setUp(self):
     SecurityTest.setUp(self)
     FSReSTMaker.setUp(self)
     self.skins, self.custom, self.fsdir, self.fsReST = self._makeContext(
                                                 'testReST', 'testReST.rst')
Exemplo n.º 45
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject( 'site', DummySite('site') )
     self.site = self.root.site
Exemplo n.º 46
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
Exemplo n.º 47
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     sm = getSiteManager()
     self.site._setObject('portal_membership', DummyMembershipTool())
     sm.registerUtility(self.site.portal_membership, IMembershipTool)
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.app)
     sm = getSiteManager()
     sm.registerUtility(DummyMembershipTool(), IMembershipTool)
Exemplo n.º 49
0
 def setUp(self):
     FSPSMaker.setUp(self)
     SecurityTest.setUp(self)
Exemplo n.º 50
0
 def setUp(self):
     SecurityTest.setUp(self)
     setUpEvents()
     self.root._setObject('portal_uidannotation', self._getTargetClass()())
     self.root._setObject('dummy', DummyContent(id='dummy'))
Exemplo n.º 51
0
    def setUp(self):
        SecurityTest.setUp(self)

        root = self.root
        root._setObject('test', PortalFolder('test', ''))
Exemplo n.º 52
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_uidgenerator', self._getTargetClass()())
Exemplo n.º 53
0
 def setUp(self):
     _TemplateSwitcher.setUp(self)
     SecurityTest.setUp(self)
     FSSTXMaker.setUp(self)
     self.skins, self.custom, self.fsdir, self.fsSTX = self._makeContext(
         'testSTX', 'testSTX.stx')
Exemplo n.º 54
0
 def setUp(self):
     SecurityTest.setUp(self)
     FSPSMaker.setUp(self)
     self._trap_warning_output()
Exemplo n.º 55
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.root._setObject('portal_uidannotation', UniqueIdAnnotationTool())
     self.root._setObject('dummy', DummyContent(id='dummy'))
 def setUp(self):
     FSDVTest.setUp(self)
     SecurityTest.setUp(self)
Exemplo n.º 57
0
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.app)
     self.site._setObject('portal_membership', self._makeOne())
Exemplo n.º 58
0
 def setUp(self):
     FSZSQLMaker.setUp(self)
     SecurityTest.setUp(self)
     self.skins, self.custom, self.fsdir, self.fsZSQL = self._makeContext(
         'testsql', 'testsql.zsql')
 def setUp(self):
     SecurityTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.site._setObject('portal_membership', DummyMembershipTool())
Exemplo n.º 60
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())