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)
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)
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)
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()
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, })
def setUp(self): setUp(self) setupFormDefaults()
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')
def setUp(self): setUp(self) setupFormDefaults() self.item = model.Item() self.option = model.Option() self.request = TestRequest()
def setUp(self): self.config = testing.setUp() from z3c.form import testing as z3cform_testing z3cform_testing.setUp(self) z3cform_testing.setupFormDefaults()