Ejemplo n.º 1
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)
Ejemplo n.º 2
0
def setUp(test):
    testing.setUp(test)
    # load dependency test setup
    import plone.z3cform
    xmlconfig.XMLConfig('testing.zcml', plone.z3cform)()
    # load test setup
    import gu.z3cform.rdf.tests
    xmlconfig.XMLConfig('testing.zcml', gu.z3cform.rdf.tests)()
    # load package configuration
    import gu.z3cform.rdf
    xmlconfig.XMLConfig('configure.zcml', gu.z3cform.rdf)()
    provideUtility(MockIORDFUtility())
Ejemplo n.º 3
0
 def setUp(self):
     setUp(self)
     setupFormDefaults()
Ejemplo n.º 4
0
 def _setUp(suite):
     testing.setUp(suite)
     testing.setupFormDefaults()
     zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
     zope.component.provideAdapter(term.CollectionTerms)
Ejemplo n.º 5
0
 def _setUp(suite):
     testing.setUp(suite)
     testing.setupFormDefaults()
     zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
     zope.component.provideAdapter(term.CollectionTerms)
Ejemplo n.º 6
0
 def setUp(self):
     setUp(self)
     setupFormDefaults()
     self.item = model.Item()
     self.option = model.Option()
     self.request = TestRequest()
Ejemplo n.º 7
0
 def setUp(self):
     testing.setUp(self)
     component.provideAdapter(field.FieldWidgets)
     component.provideAdapter(DefaultTraversable, [None])
     self.context = self.globs['root']
Ejemplo n.º 8
0
def setUp(test):
    testing.setUp(test)
    test.globs.update(dict(
        interface=interface,
        component=component,
        schema=schema))
Ejemplo n.º 9
0
 def setUp(self):
     testing.setUp(self)
     component.provideAdapter(field.FieldWidgets)
     component.provideAdapter(DefaultTraversable, [None])
     self.context = self.globs['root']
Ejemplo n.º 10
0
 def setUp(self):
     self.config = testing.setUp()
     from z3c.form import testing as z3cform_testing
     z3cform_testing.setUp(self)
     z3cform_testing.setupFormDefaults()
Ejemplo n.º 11
0
def setUp(test):
    testing.setUp(test)
    test.globs.update(
        dict(interface=interface, component=component, schema=schema))