[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Added SessionLayer, SQLScriptLayer, OnlineHelpLayer,

Baiju M baiju.m.mail at gmail.com
Thu Feb 8 23:46:16 EST 2007


Log message for revision 72478:
  Added SessionLayer, SQLScriptLayer, OnlineHelpLayer,
  PublicationLayer and AppWorkflowLayer.
  

Changed:
  U   Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py
  A   Zope3/trunk/src/zope/app/onlinehelp/ftesting.zcml
  A   Zope3/trunk/src/zope/app/onlinehelp/testing.py
  A   Zope3/trunk/src/zope/app/publication/ftesting.zcml
  U   Zope3/trunk/src/zope/app/publication/ftests.py
  A   Zope3/trunk/src/zope/app/publication/testing.py
  A   Zope3/trunk/src/zope/app/session/ftesting.zcml
  U   Zope3/trunk/src/zope/app/session/ftests.py
  A   Zope3/trunk/src/zope/app/session/testing.py
  U   Zope3/trunk/src/zope/app/sqlscript/browser/ftests.py
  A   Zope3/trunk/src/zope/app/sqlscript/ftesting.zcml
  A   Zope3/trunk/src/zope/app/sqlscript/testing.py
  A   Zope3/trunk/src/zope/app/workflow/ftesting.zcml
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py
  A   Zope3/trunk/src/zope/app/workflow/testing.py

-=-
Modified: Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -24,6 +24,7 @@
 from zope.app.testing.functional import BrowserTestCase
 from zope.app.onlinehelp.tests.test_onlinehelp import testdir
 from zope.app.onlinehelp import globalhelp
+from zope.app.onlinehelp.testing import OnlineHelpLayer
 
 class Test(BrowserTestCase):
 
@@ -82,6 +83,7 @@
 
 
 def test_suite():
+    Test.layer = OnlineHelpLayer
     return unittest.makeSuite(Test)
 
 if __name__ == '__main__':

Added: Zope3/trunk/src/zope/app/onlinehelp/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/ftesting.zcml	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/onlinehelp/ftesting.zcml	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,56 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   i18n_domain="zope"
+   package="zope.app.onlinehelp"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.onlinehelp" file="meta.zcml"/>
+  <include package="zope.app.preference" file="meta.zcml" />
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.apidoc"/>
+  <include package="zope.app.file"/>
+  <include package="zope.app.onlinehelp"/>
+  <include package="zope.app.preference" />
+  <include package="zope.app.renderer"/>
+  <include package="zope.app.authentication" />
+
+  <include package="zope.app.securitypolicy" />
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Anonymous" title="Everybody"
+                 description="All users have this role implicitly" />
+  <role id="zope.Manager" title="Site Manager" />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+                  role="zope.Anonymous" />
+
+  <grantAll role="zope.Manager" />
+
+  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/onlinehelp/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/onlinehelp/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/testing.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/onlinehelp/testing.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,26 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.onlinehelp common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+OnlineHelpLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'OnlineHelpLayer', allow_teardown=True)


Property changes on: Zope3/trunk/src/zope/app/onlinehelp/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/publication/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/publication/ftesting.zcml	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/publication/ftesting.zcml	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,57 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   i18n_domain="zope"
+   package="zope.app.publication"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.dav" file="meta.zcml"/>
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.dav"/>
+  <include package="zope.app.authentication" />
+  <include package="zope.app.zptpage"/>
+  <include package="zope.app.securitypolicy" />
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Anonymous" title="Everybody"
+                 description="All users have this role implicitly" />
+  <role id="zope.Manager" title="Site Manager" />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+                  role="zope.Anonymous" />
+
+  <grantAll role="zope.Manager" />
+
+  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+  <!-- Principals -->
+
+  <unauthenticatedPrincipal
+      id="zope.anybody"
+      title="Unauthenticated User" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/publication/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/publication/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/publication/ftests.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/publication/ftests.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -17,12 +17,19 @@
 """
 import unittest
 from zope.app.testing import functional
+from zope.app.publication.testing import PublicationLayer
 
 def test_suite():
+    notfound = functional.FunctionalDocFileSuite('notfound.txt')
+    notfound.layer = PublicationLayer
+    methodnotallowed = functional.FunctionalDocFileSuite('methodnotallowed.txt')
+    methodnotallowed.layer = PublicationLayer
+    httpfactory = functional.FunctionalDocFileSuite('httpfactory.txt')
+    httpfactory.layer = PublicationLayer
     return unittest.TestSuite((
-        functional.FunctionalDocFileSuite('notfound.txt'),
-        functional.FunctionalDocFileSuite('methodnotallowed.txt'),
-        functional.FunctionalDocFileSuite('httpfactory.txt'),
+        notfound,
+        methodnotallowed,
+        httpfactory,
         ))
 
 if __name__ == '__main__':

Added: Zope3/trunk/src/zope/app/publication/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/publication/testing.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/publication/testing.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.publication common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+PublicationLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'PublicationLayer', allow_teardown=True)
+


Property changes on: Zope3/trunk/src/zope/app/publication/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/session/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/session/ftesting.zcml	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/session/ftesting.zcml	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,54 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   i18n_domain="zope"
+   package="zope.app.session"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.authentication" />
+  <include package="zope.app.zptpage"/>
+  <include package="zope.app.securitypolicy" />
+  <include package="zope.app.session" />
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Anonymous" title="Everybody"
+                 description="All users have this role implicitly" />
+  <role id="zope.Manager" title="Site Manager" />
+
+  <!-- Replace the following directive if you don't want public access -->
+  <grant permission="zope.View"
+                  role="zope.Anonymous" />
+
+  <grantAll role="zope.Manager" />
+
+  <!-- Principals -->
+
+  <unauthenticatedPrincipal
+      id="zope.anybody"
+      title="Unauthenticated User" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/session/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/session/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/session/ftests.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/session/ftests.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Session functional tests.
 
-$Id: tests.py 26427 2004-07-12 16:05:02Z Zen $
+$Id$
 """
 import unittest
 from zope.component import provideHandler, getGlobalSiteManager
@@ -22,6 +22,7 @@
 from zope.app.publication.interfaces import IBeforeTraverseEvent
 from zope.app.testing.functional import BrowserTestCase
 from zope.app.zptpage.zptpage import ZPTPage
+from zope.app.session.testing import SessionLayer
 
 from interfaces import ISession
 
@@ -106,6 +107,8 @@
         self.assertCookiePath('/')
         
 def test_suite():
+    ZPTSessionTest.layer = SessionLayer
+    VirtualHostSessionTest.layer = SessionLayer
     return unittest.TestSuite((
         unittest.makeSuite(ZPTSessionTest),
         unittest.makeSuite(VirtualHostSessionTest),

Added: Zope3/trunk/src/zope/app/session/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/session/testing.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/session/testing.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.session common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+SessionLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'SessionLayer', allow_teardown=True)
+


Property changes on: Zope3/trunk/src/zope/app/session/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/sqlscript/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/browser/ftests.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/sqlscript/browser/ftests.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -13,12 +13,13 @@
 ##############################################################################
 """Functional tests for SQL Script.
 
-$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
+$Id$
 """
 import unittest
 from zope.app.testing.functional import BrowserTestCase
 from zope.app.sqlscript.sqlscript import SQLScript
 from xml.sax.saxutils import escape
+from zope.app.sqlscript.testing import SQLScriptLayer
 
 class SQLScriptTest(BrowserTestCase):
 
@@ -136,6 +137,7 @@
 
 
 def test_suite():
+    SQLScriptTest.layer = SQLScriptLayer
     return unittest.TestSuite((
         unittest.makeSuite(SQLScriptTest),
         ))

Added: Zope3/trunk/src/zope/app/sqlscript/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/ftesting.zcml	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/sqlscript/ftesting.zcml	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,45 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   i18n_domain="zope"
+   package="zope.app.sqlscript"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.cache" />
+  <include package="zope.app.authentication" />
+  <include package="zope.app.zptpage"/>
+  <include package="zope.app.securitypolicy" />
+  <include package="zope.app.sqlscript"/>
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Manager" title="Site Manager" />
+
+  <grantAll role="zope.Manager" />
+
+  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/sqlscript/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/sqlscript/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/testing.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/sqlscript/testing.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.sqlscript common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+SQLScriptLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'SQLScriptLayer', allow_teardown=True)
+


Property changes on: Zope3/trunk/src/zope/app/sqlscript/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/workflow/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/ftesting.zcml	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/workflow/ftesting.zcml	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,43 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   i18n_domain="zope"
+   package="zope.app.workflow"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.file"/>
+  <include package="zope.app.authentication" />
+  <include package="zope.app.securitypolicy" />
+  <include package="zope.app.workflow"/>
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Manager" title="Site Manager" />
+
+  <grantAll role="zope.Manager" />
+
+  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+      id="zope.globalmgr"
+      title="Manager"
+      login="globalmgr"
+      password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/workflow/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -29,6 +29,7 @@
 from zope.app.workflow.stateful.definition import StatefulProcessDefinition
 from zope.app.workflow.stateful.interfaces import IStatefulProcessDefinition,\
      IContentWorkflowsManager
+from zope.app.workflow.testing import AppWorkflowLayer
 
 class Test(BrowserTestCase):
 
@@ -109,6 +110,7 @@
         self.assertEqual(len(ifaces), 0)
 
 def test_suite():
+    Test.layer = AppWorkflowLayer
     return unittest.makeSuite(Test)
 
 if __name__ == '__main__':

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -21,6 +21,7 @@
 from zope.app import zapi
 from zope.app.testing.functional import BrowserTestCase
 from zope.app.workflow.stateful.definition import StatefulProcessDefinition
+from zope.app.workflow.testing import AppWorkflowLayer
 
 xml=u"""<?xml version="1.0"?>
 <workflow type="StatefulWorkflow"
@@ -141,6 +142,7 @@
 
 
 def test_suite():
+    Test.layer = AppWorkflowLayer
     return unittest.makeSuite(Test)
 
 if __name__ == '__main__':

Added: Zope3/trunk/src/zope/app/workflow/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/testing.py	2007-02-09 03:25:38 UTC (rev 72477)
+++ Zope3/trunk/src/zope/app/workflow/testing.py	2007-02-09 04:46:15 UTC (rev 72478)
@@ -0,0 +1,26 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.workflow common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+AppWorkflowLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'AppWorkflowLayer', allow_teardown=True)


Property changes on: Zope3/trunk/src/zope/app/workflow/testing.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the Zope3-Checkins mailing list