def schema(self): ct = zope.component.queryUtility(ICurationTool) flags = ct is not None and ct.all_flags or {} schema = buildSchemaInterface(flags) return schema
def test_0000_buildSchemaInterface_base(self): klass = buildSchemaInterface(self.tool.all_flags) self.assertEqual(sorted(klass.names()), sorted(self.ids.keys())) self.assertTrue(isinstance(klass['curation'], zope.schema.Choice))
def setupFields(self): # should provide method or something ct = zope.component.queryUtility(ICurationTool) flags = ct is not None and ct.all_flags or {} schema = buildSchemaInterface(ct.all_flags) self.fields = Fields(schema)