[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Added ZPTPageLayer, RotterdamLayer and GenerationsLayer.

Baiju M baiju.m.mail at gmail.com
Tue Feb 6 01:28:06 EST 2007


Log message for revision 72390:
  Added ZPTPageLayer, RotterdamLayer and GenerationsLayer.
  

Changed:
  U   Zope3/trunk/src/zope/app/generations/browser/ftests.py
  A   Zope3/trunk/src/zope/app/generations/ftesting.zcml
  A   Zope3/trunk/src/zope/app/generations/testing.py
  A   Zope3/trunk/src/zope/app/rotterdam/ftesting.zcml
  U   Zope3/trunk/src/zope/app/rotterdam/ftests.py
  A   Zope3/trunk/src/zope/app/rotterdam/testing.py
  U   Zope3/trunk/src/zope/app/zptpage/browser/ftests.py
  A   Zope3/trunk/src/zope/app/zptpage/ftesting.zcml
  A   Zope3/trunk/src/zope/app/zptpage/testing.py

-=-
Modified: Zope3/trunk/src/zope/app/generations/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/generations/browser/ftests.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/generations/browser/ftests.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -20,6 +20,7 @@
 from zope.app.testing import ztapi, functional
 from zope.app.generations.generations import SchemaManager, generations_key
 from zope.app.generations.interfaces import ISchemaManager
+from zope.app.generations.testing import GenerationsLayer
 
 class TestDatabaseSchema(functional.BrowserTestCase):
 
@@ -80,4 +81,5 @@
 
         
 def test_suite():
+    TestDatabaseSchema.layer = GenerationsLayer
     return unittest.makeSuite(TestDatabaseSchema)

Added: Zope3/trunk/src/zope/app/generations/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/generations/ftesting.zcml	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/generations/ftesting.zcml	2007-02-06 06:28:05 UTC (rev 72390)
@@ -0,0 +1,39 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="zope"
+   package="zope.app.generations"
+   >
+
+  <!-- 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.securitypolicy" />
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Manager" title="Site Manager" />
+
+  <grantAll role="zope.Manager" />
+
+  <!-- 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/generations/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/generations/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/generations/testing.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/generations/testing.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -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.zptpage common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+GenerationsLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'GenerationsLayer', allow_teardown=True)


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

Added: Zope3/trunk/src/zope/app/rotterdam/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/ftesting.zcml	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/rotterdam/ftesting.zcml	2007-02-06 06:28:05 UTC (rev 72390)
@@ -0,0 +1,41 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="zope"
+   package="zope.app.zptpage"
+   >
+
+  <!-- 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.securitypolicy" />
+
+  <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/rotterdam/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/rotterdam/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/ftests.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/rotterdam/ftests.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -16,6 +16,7 @@
 import unittest
 from xml.dom import minidom
 from zope.app.testing.functional import BrowserTestCase
+from zope.app.rotterdam.testing import RotterdamLayer
 
 class TestNavTree(BrowserTestCase):
 
@@ -73,6 +74,7 @@
 
 def test_suite():
     suite = unittest.TestSuite()
+    TestNavTree.layer = RotterdamLayer
     suite.addTest(unittest.makeSuite(TestNavTree))
     return suite
 

Added: Zope3/trunk/src/zope/app/rotterdam/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/testing.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/rotterdam/testing.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -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.rotterdam common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+RotterdamLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'RotterdamLayer', allow_teardown=True)


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

Modified: Zope3/trunk/src/zope/app/zptpage/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/browser/ftests.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/zptpage/browser/ftests.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -13,12 +13,13 @@
 ##############################################################################
 """Functional tests for ZPT Page.
 
-$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
+$Id$
 """
 import unittest
 from zope.app.testing.functional import BrowserTestCase
 from zope.app.zptpage.zptpage import ZPTPage
 from xml.sax.saxutils import escape
+from zope.app.zptpage.testing import ZPTPageLayer
 
 class ZPTPageTest(BrowserTestCase):
 
@@ -198,10 +199,15 @@
 
 def test_suite():
     from zope.app.testing.functional import FunctionalDocFileSuite
+    collector = FunctionalDocFileSuite('collector266.txt', 'collector269.txt')
+    url = FunctionalDocFileSuite('url.txt')
+    collector.layer = ZPTPageLayer
+    ZPTPageTest.layer = ZPTPageLayer
+    url.layer = ZPTPageLayer
     return unittest.TestSuite((
         unittest.makeSuite(ZPTPageTest),
-        FunctionalDocFileSuite('collector266.txt', 'collector269.txt'),
-        FunctionalDocFileSuite('url.txt'),
+        collector,
+        url,
         ))
 
 if __name__ == '__main__':

Added: Zope3/trunk/src/zope/app/zptpage/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/ftesting.zcml	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/zptpage/ftesting.zcml	2007-02-06 06:28:05 UTC (rev 72390)
@@ -0,0 +1,43 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="zope"
+   package="zope.app.zptpage"
+   >
+
+  <!-- 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.formlib" />
+  <include package="zope.app.zptpage"/>
+
+  <include package="zope.app.securitypolicy" />
+
+  <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/zptpage/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/zptpage/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/testing.py	2007-02-06 05:14:32 UTC (rev 72389)
+++ Zope3/trunk/src/zope/app/zptpage/testing.py	2007-02-06 06:28:05 UTC (rev 72390)
@@ -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.zptpage common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+ZPTPageLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'ZPTPageLayer', allow_teardown=True)


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



More information about the Zope3-Checkins mailing list