Back to index

plone3  3.1.7
Public Member Functions
GenericSetup.tests.test_zcml.ImportStepTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def testNoDependencies
def testWithDependency

Detailed Description

Definition at line 295 of file test_zcml.py.


Member Function Documentation

Definition at line 297 of file test_zcml.py.

00297 
00298     def setUp(self):
00299         import Products.GenericSetup
00300         zcml.load_config('meta.zcml', Products.GenericSetup)

Definition at line 301 of file test_zcml.py.

00301 
00302     def tearDown(self):
00303         cleanUp()

Here is the call graph for this function:

Definition at line 304 of file test_zcml.py.

00304 
00305     def testNoDependencies(self):
00306         zcml.load_string("""<configure
00307                               xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
00308                               i18n_domain="genericsetup">
00309                              <genericsetup:importStep
00310                                  name="name"
00311                                  title="title"
00312                                  description="description"
00313                                  handler="Products.GenericSetup.tests.test_zcml.dummy_importstep_handler">
00314                              </genericsetup:importStep>
00315                             </configure>""")
00316         from Products.GenericSetup.zcml import _import_step_regs
00317         self.assertEqual(_import_step_regs, [u'name'])
00318         self.assertEqual( _import_step_registry.listSteps(), [u'name'])
00319         data=_import_step_registry.getStepMetadata(u'name')
00320         self.assertEqual(data["handler"],
00321                 'Products.GenericSetup.tests.test_zcml.dummy_importstep_handler')
00322         self.assertEqual(data["description"], u"description")
00323         self.assertEqual(data["title"], u"title")
00324         self.assertEqual(data["dependencies"], ())
00325         self.assertEqual(data["id"], u"name")
00326 

Definition at line 327 of file test_zcml.py.

00327 
00328     def testWithDependency(self):
00329         zcml.load_string("""<configure
00330                               xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
00331                               i18n_domain="genericsetup">
00332                              <genericsetup:importStep
00333                                  name="name"
00334                                  title="title"
00335                                  description="description"
00336                                  handler="Products.GenericSetup.tests.test_zcml.dummy_importstep_handler">
00337                                 <depends name="something.else"/>
00338                              </genericsetup:importStep>
00339                             </configure>""")
00340         data=_import_step_registry.getStepMetadata(u'name')
00341         self.assertEqual(data["dependencies"], (u"something.else",))
00342 
00343 


The documentation for this class was generated from the following file: