Beispiel #1
0
def setUp(self):
    from Zope2.App.schema import configure_vocabulary_registry
    configure_vocabulary_registry()

    zcml.load_config('browser_testing.zcml', plone.schemaeditor.tests)

    # add a test layer to the request so we can use special form templates
    # that don't pull in main_template
    classImplements(BaseRequest, ITestLayer)
Beispiel #2
0
def setUp(self):
    from Zope2.App.schema import configure_vocabulary_registry
    configure_vocabulary_registry()

    zcml.load_config('browser_testing.zcml', plone.schemaeditor.tests)

    # add a test layer to the request so we can use special form templates
    # that don't pull in main_template
    classImplements(BaseRequest, ITestLayer)
Beispiel #3
0
def setup_product():
    fiveconfigure.debug_mode = True
    ZopeLite.installProduct('Five', quiet=1)
    zcml.load_site()
    configure_vocabulary_registry()
    
    import Products.CMFCore
    import Products.Five
    import Products.GenericSetup
    import zope.i18n
    import netsight.async
Beispiel #4
0
def setup_product():
    fiveconfigure.debug_mode = True
    ZopeLite.installProduct('Five', quiet=1)
    zcml.load_site()
    configure_vocabulary_registry()

    import Products.CMFCore
    import Products.Five
    import Products.GenericSetup
    import zope.i18n
    import netsight. async
Beispiel #5
0
    def setUp(cls):
        import Products.CMFDefault
        import Products.DCWorkflow

        zcml.load_config('configure.zcml', Products.CMFDefault)
        zcml.load_config('configure.zcml', Products.DCWorkflow)
        configure_vocabulary_registry()

        app = ZopeTestCase.app()
        addConfiguredSite(app, 'site', 'Products.CMFDefault:default',
                          snapshot=False)
        transaction.commit()
        ZopeTestCase.close(app)
def setUp(suite):  # pragma: no cover
    zope.component.testing.setUp(suite)

    try:
        from Zope2.App.schema import configure_vocabulary_registry
    except ImportError:
        try:
            from zope.schema.vocabulary import setVocabularyRegistry
            from Products.Five.schema import Zope2VocabularyRegistry
        except ImportError:
            pass
        else:
            setVocabularyRegistry(Zope2VocabularyRegistry())
    else:
        configure_vocabulary_registry()
    def setUp(cls):
        import Products.CMFDefault
        import Products.DCWorkflow

        zcml.load_config('configure.zcml', Products.CMFDefault)
        zcml.load_config('configure.zcml', Products.DCWorkflow)
        configure_vocabulary_registry()

        app = ZopeTestCase.app()
        addConfiguredSite(app,
                          'site',
                          'Products.CMFDefault:default',
                          snapshot=False)
        transaction.commit()
        ZopeTestCase.close(app)
def setUp(self):
    try:
        from Zope2.App.schema import configure_vocabulary_registry
    except ImportError:
        try:
            from zope.schema.vocabulary import setVocabularyRegistry
            from Products.Five.schema import Zope2VocabularyRegistry
        except ImportError:
            pass
        else:
            setVocabularyRegistry(Zope2VocabularyRegistry())
    else:
        configure_vocabulary_registry()

    zcml.load_config('browser_testing.zcml', plone.schemaeditor.tests)

    # add a test layer to the request so we can use special form templates that don't
    # pull in main_template
    classImplements(BaseRequest, ITestLayer)
Beispiel #9
0
def setUp(self):
    try:
        from Zope2.App.schema import configure_vocabulary_registry
    except ImportError:
        try:
            from zope.schema.vocabulary import setVocabularyRegistry
            from Products.Five.schema import Zope2VocabularyRegistry
        except ImportError:
            pass
        else:
            setVocabularyRegistry(Zope2VocabularyRegistry())
    else:
        configure_vocabulary_registry()

    zcml.load_config('browser_testing.zcml', plone.schemaeditor.tests)

    # add a test layer to the request so we can use special form templates that don't
    # pull in main_template
    classImplements(BaseRequest, ITestLayer)
Beispiel #10
0
def safe_load_site():
    '''Loads entire component architecture (w/ debug mode on).'''
    cleanUp()
    setDebugMode(1)
    try:
        from Zope2.App import zcml
    except ImportError:
        from Products.Five import zcml
    zcml.load_site()
    try:
        from Zope2.App.schema import configure_vocabulary_registry
    except ImportError:
        try:
            from zope.schema.vocabulary import setVocabularyRegistry
            from Products.Five.schema import Zope2VocabularyRegistry
        except ImportError:
            pass
        else:
            setVocabularyRegistry(Zope2VocabularyRegistry())
    else:
        configure_vocabulary_registry()
    setDebugMode(0)