def setUpZope(self, app, configurationContext):
        # prepare z3cforms
        from z3c.form import testing
        testing.setupFormDefaults()

        # load ZCML
        import collective.z3cform.keywordwidget
        xmlconfig.file('configure.zcml', collective.z3cform.keywordwidget,
                        context=configurationContext)
예제 #2
0
파일: tests.py 프로젝트: bendavis78/zope
def setUp(test):
    from z3c.form import testing
    testing.setupFormDefaults()

    # register provider TALES
    from zope.app.pagetemplate import metaconfigure
    from zope.contentprovider import tales
    metaconfigure.clear()
    metaconfigure.registerType('provider', tales.TALESProviderExpression)
예제 #3
0
def setUp(test):
    # Setup z3c.form basic setup
    testing.setUp(test)
    testing.setupFormDefaults()
    # CKEditor setup
    template = os.path.join(os.path.dirname(__file__), 'ckeditor_input.pt')
    factory = widget.WidgetTemplateFactory(
        template, widget=interfaces.ICKEditorWidget)
    zope.component.provideAdapter(factory, name='input')
    zope.component.provideAdapter(ckeditor.CKEditorFieldWidget)
예제 #4
0
def setUp(test):
    setup.placelessSetUp()
    from z3c.form import testing
    testing.setupFormDefaults()
    vr = getVocabularyRegistry()
    from schooltool.basicperson.vocabularies import groupVocabularyFactory
    from schooltool.basicperson.vocabularies import advisorVocabularyFactory
    vr.register('schooltool.basicperson.group_vocabulary',
                groupVocabularyFactory())
    vr.register('schooltool.basicperson.advisor_vocabulary',
                advisorVocabularyFactory())
    setUpRelationships()
    setUpAnnotations()
예제 #5
0
def setUp(test):
    setup.placelessSetUp()
    from z3c.form import testing
    testing.setupFormDefaults()
    vr = getVocabularyRegistry()
    from schooltool.basicperson.vocabularies import groupVocabularyFactory
    from schooltool.basicperson.vocabularies import advisorVocabularyFactory
    vr.register('schooltool.basicperson.group_vocabulary',
                groupVocabularyFactory())
    vr.register('schooltool.basicperson.advisor_vocabulary',
                advisorVocabularyFactory())
    setUpRelationships()
    setUpAnnotations()
예제 #6
0
def setUp(test):
    setup.placefulSetUp()
    from z3c.form import testing
    testing.setupFormDefaults()
    from zope.app.schema import vocabulary
    vocabulary._clear()
    zcml = getIntegrationTestZCML()
    zcml.string('''
    <utility
        factory="schooltool.basicperson.vocabularies.groupVocabularyFactory"
        provides="zope.schema.interfaces.IVocabularyFactory"
        name="schooltool.basicperson.group_vocabulary" />
    <utility
        factory="schooltool.basicperson.vocabularies.advisorVocabularyFactory"
        provides="zope.schema.interfaces.IVocabularyFactory"
        name="schooltool.basicperson.advisor_vocabulary" />
    ''')
    app = AppStub()
    test.globs.update({
        'app': app,
    })
예제 #7
0
def setUp(test):
    setup.placefulSetUp()
    from z3c.form import testing
    testing.setupFormDefaults()
    from zope.app.schema import vocabulary
    vocabulary._clear()
    zcml = getIntegrationTestZCML()
    zcml.string('''
    <utility
        factory="schooltool.basicperson.vocabularies.groupVocabularyFactory"
        provides="zope.schema.interfaces.IVocabularyFactory"
        name="schooltool.basicperson.group_vocabulary" />
    <utility
        factory="schooltool.basicperson.vocabularies.advisorVocabularyFactory"
        provides="zope.schema.interfaces.IVocabularyFactory"
        name="schooltool.basicperson.advisor_vocabulary" />
    ''')
    app = AppStub()
    test.globs.update({
        'app': app,
    })
예제 #8
0
 def setUp(self):
     setUp(self)
     setupFormDefaults()
예제 #9
0
파일: tests.py 프로젝트: Shoobx/z3c.form
 def _setUp(suite):
     testing.setUp(suite)
     testing.setupFormDefaults()
     zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
     zope.component.provideAdapter(term.CollectionTerms)
    def setUp(self):
        setupFormDefaults()

        grok('plone.directives.form.meta')
        grok('plone.directives.form.tests.test_validator')
예제 #11
0
 def _setUp(suite):
     testing.setUp(suite)
     testing.setupFormDefaults()
     zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
     zope.component.provideAdapter(term.CollectionTerms)
예제 #12
0
    def setUp(self):
        setupFormDefaults()

        grok('plone.directives.form.meta')
        grok('plone.directives.form.tests.test_validator')
예제 #13
0
파일: test_core.py 프로젝트: PMR2/pmr2.json
 def setUp(self):
     setUp(self)
     setupFormDefaults()
     self.item = model.Item()
     self.option = model.Option()
     self.request = TestRequest()
예제 #14
0
 def setUp(self):
     self.config = testing.setUp()
     from z3c.form import testing as z3cform_testing
     z3cform_testing.setUp(self)
     z3cform_testing.setupFormDefaults()