[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/tests -
test_directives.py:1.4.2.1
Philipp von Weitershausen
philikon at philikon.de
Wed Aug 6 11:28:08 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/workflow/tests
In directory cvs.zope.org:/tmp/cvs-serv14946/workflow/tests
Modified Files:
Tag: zcml-interface-field-branch
test_directives.py
Log Message:
Fix up tests to use the ConfigurationMachine from zope.app.configure which
is service-aware.
=== Zope3/src/zope/app/workflow/tests/test_directives.py 1.4 => 1.4.2.1 ===
--- Zope3/src/zope/app/workflow/tests/test_directives.py:1.4 Fri Aug 1 16:41:05 2003
+++ Zope3/src/zope/app/workflow/tests/test_directives.py Wed Aug 6 10:28:04 2003
@@ -17,20 +17,30 @@
"""
import unittest
-from zope.app.tests.placelesssetup import PlacelessSetup
from zope.configuration import xmlconfig
+import zope.app.configuration
+import zope.app.component.service
+
from zope.app.workflow import globalimportexport
from zope.app.workflow.tests import directive_helpers
+from zope.app.tests.placelesssetup import PlacelessSetup
gIE = globalimportexport.globalImportExport
-
class DirectivesTest(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
- self.context = xmlconfig.file("workflow.zcml", directive_helpers)
+ self._config()
+
+ def _config(self):
+ sm = zope.app.component.service.globalServiceManager()
+ context = zope.app.configuration.ConfigurationMachine(sm)
+ xmlconfig.registerCommonDirectives(context)
+ xmlconfig.file('workflow.zcml', package=directive_helpers,
+ context=context)
+ self._context = context
def testImportHandler(self):
self.assertEqual(
@@ -41,8 +51,6 @@
self.assertEqual(
gIE._exporters.get(directive_helpers.ITestProcessDefinitionA),
directive_helpers.TestExportHandlerA)
-
-
def test_suite():
return unittest.TestSuite((
More information about the Zope3-Checkins
mailing list