Ejemplo n.º 1
0
 def getExportStepMetadata(self, step, default=None):
     """Simple wrapper to query both the global and local step registry."""
     res = self._export_registry.getStepMetadata(step, self)
     if res is self and not self._exclude_global_steps:
         res = _export_step_registry.getStepMetadata(step, default)
     if res is not self:
         return res
     return default
Ejemplo n.º 2
0
 def getExportStepMetadata(self, step, default=None):
     """Simple wrapper to query both the global and local step registry."""
     res = self._export_registry.getStepMetadata(step, self)
     if res is self and not self._exclude_global_steps:
         res = _export_step_registry.getStepMetadata(step, default)
     if res is not self:
         return res
     return default
Ejemplo n.º 3
0
 def testRegistration(self):
     zcml.load_string("""\
     <configure xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
                i18n_domain="genericsetup">
     <genericsetup:exportStep
         name="name"
         title="title"
         description="description"
         handler="Products.GenericSetup.tests.test_zcml.dummy_exportstep"
         />
     </configure>""")
     self.assertEqual( _export_step_registry.listSteps(), [u'name'])
     data=_export_step_registry.getStepMetadata(u'name')
     self.assertEqual(data["handler"],
             'Products.GenericSetup.tests.test_zcml.dummy_exportstep')
     self.assertEqual(data["description"], u"description")
     self.assertEqual(data["title"], u"title")
     self.assertEqual(data["id"], u"name")
Ejemplo n.º 4
0
 def testRegistration(self):
     zcml.load_string("""\
     <configure xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
                i18n_domain="genericsetup">
     <genericsetup:exportStep
         name="name"
         title="title"
         description="description"
         handler="Products.GenericSetup.tests.test_zcml.dummy_exportstep"
         />
     </configure>""")
     self.assertEqual( _export_step_registry.listSteps(), [u'name'])
     data=_export_step_registry.getStepMetadata(u'name')
     self.assertEqual(data["handler"],
             'Products.GenericSetup.tests.test_zcml.dummy_exportstep')
     self.assertEqual(data["description"], u"description")
     self.assertEqual(data["title"], u"title")
     self.assertEqual(data["id"], u"name")
Ejemplo n.º 5
0
 def getExportStepMetadata(self, step, default=None):
     """Simple wrapper to query both the global and local step registry."""
     res=self._export_registry.getStepMetadata(step, default)
     if res is not default:
         return res
     return _export_step_registry.getStepMetadata(step, default)
Ejemplo n.º 6
0
 def getExportStepMetadata(self, step, default=None):
     """Simple wrapper to query both the global and local step registry."""
     res = self._export_registry.getStepMetadata(step, default)
     if res is not default:
         return res
     return _export_step_registry.getStepMetadata(step, default)