[Zope3-checkins] SVN: Zope3/trunk/ Merge from 3.3 branch:

Philipp von Weitershausen philikon at philikon.de
Fri Aug 18 07:12:48 EDT 2006


Log message for revision 69645:
  Merge from 3.3 branch:
  
   Log message for revision 69639:
    Refactor the way we check for no developer mode: use the new
    not-have verb in zcml:condition.
  
   Log message for revision 69640:
    cosmetics: common indention in zcml
  
   Log message for revision 69642:
    Allow the fucntional nodevmode testing layer to be used from instances
    as well.  That means the zopeskel files also needed a non-devmode
    ftesting.zcml (called ftesting-base.zcml) and the necessary file path
    manipulation was needed in zope.app.testing.functional.
  
  

Changed:
  D   Zope3/trunk/ftesting-nodevmode.zcml
  U   Zope3/trunk/src/zope/app/apidoc/browser/ftests.py
  U   Zope3/trunk/src/zope/app/apidoc/configure.zcml
  U   Zope3/trunk/src/zope/app/server/main.py
  U   Zope3/trunk/src/zope/app/testing/functional.py
  U   Zope3/trunk/src/zope/app/twisted/main.py
  U   Zope3/trunk/src/zope/app/wsgi/__init__.py
  A   Zope3/trunk/zopeskel/etc/ftesting-base.zcml
  U   Zope3/trunk/zopeskel/etc/ftesting.zcml

-=-
Deleted: Zope3/trunk/ftesting-nodevmode.zcml
===================================================================
--- Zope3/trunk/ftesting-nodevmode.zcml	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/ftesting-nodevmode.zcml	2006-08-18 11:12:47 UTC (rev 69645)
@@ -1,12 +0,0 @@
-<configure
-   xmlns="http://namespaces.zope.org/zope"
-   xmlns:meta="http://namespaces.zope.org/meta"
-   i18n_domain="zope"
-   >
-
-  <!-- Turn off the devmode -->
-  <meta:provides feature="nodevmode" />
-
-  <include file="ftesting-base.zcml" />
-
-</configure>

Modified: Zope3/trunk/src/zope/app/apidoc/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/browser/ftests.py	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/apidoc/browser/ftests.py	2006-08-18 11:12:47 UTC (rev 69645)
@@ -19,7 +19,7 @@
 
 import zope.app.testing.functional
 from zope.testing import doctest
-from zope.app.testing.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase, FunctionalNoDevMode
 from zope.app.testing.functional import FunctionalDocFileSuite
 
 
@@ -63,13 +63,6 @@
         self.checkForBrokenLinks(body, '/++apidoc++/modulelist.html',
                                  basic='mgr:mgrpw')
 
-
-NoDevModeLayer = zope.app.testing.functional.ZCMLLayer(
-    "ftesting-nodevmode.zcml",
-    __name__, 
-    "NoDevModeLayer")
-
-
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(APIDocTests))
@@ -80,7 +73,7 @@
         )
 
     nodevmode = FunctionalDocFileSuite("nodevmode.txt")
-    nodevmode.layer = NoDevModeLayer
+    nodevmode.layer = FunctionalNoDevMode
     suite.addTest(nodevmode)
     return suite
 

Modified: Zope3/trunk/src/zope/app/apidoc/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/configure.zcml	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/apidoc/configure.zcml	2006-08-18 11:12:47 UTC (rev 69645)
@@ -5,13 +5,13 @@
   i18n_domain="zope">
 
   <include
-    zcml:condition="have devmode"
-    file="enabled.zcml"
-    />
+      zcml:condition="have devmode"
+      file="enabled.zcml"
+      />
 
   <include
-    zcml:condition="have nodevmode"
-    file="disabled.zcml"
-    />
+      zcml:condition="not-have devmode"
+      file="disabled.zcml"
+      />
 
 </configure>

Modified: Zope3/trunk/src/zope/app/server/main.py
===================================================================
--- Zope3/trunk/src/zope/app/server/main.py	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/server/main.py	2006-08-18 11:12:47 UTC (rev 69645)
@@ -105,8 +105,6 @@
         logging.warning("Developer mode is enabled: this is a security risk "
             "and should NOT be enabled on production servers. Developer mode "
             "can be turned off in etc/zope.conf")
-    else:
-        features += ('nodevmode',)
 
     zope.app.appsetup.config(options.site_definition, features=features)
 

Modified: Zope3/trunk/src/zope/app/testing/functional.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/functional.py	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/testing/functional.py	2006-08-18 11:12:47 UTC (rev 69645)
@@ -214,19 +214,24 @@
 
 if os.path.exists(os.path.join('zopeskel', 'etc', 'ftesting.zcml')):
     Functional = os.path.join('zopeskel', 'etc', 'ftesting.zcml')
+    FunctionalNoDevMode = os.path.join('zopeskel', 'etc', 'ftesting-base.zcml')
 elif os.path.exists(os.path.join('etc', 'ftesting.zcml')):
     Functional = os.path.join('etc', 'ftesting.zcml')
+    FunctionalNoDevMode = os.path.join('etc', 'ftesting-base.zcml')
 else:
     # let's hope that the file is in our CWD. If not, we'll get an
     # error anyways, but we can't just throw an error if we don't find
     # that file. This module might be imported for other things as
     # well, not only starting up Zope from ftesting.zcml.    
     Functional = 'ftesting.zcml'
+    FunctionalNoDevMode = 'ftesting-base.zcml'
 
 Functional = os.path.abspath(Functional)
+FunctionalNoDevMode = os.path.abspath(FunctionalNoDevMode)
 
-Functional = ZCMLLayer(
-    Functional, __name__, 'Functional')
+Functional = ZCMLLayer(Functional, __name__, 'Functional')
+FunctionalNoDevMode = ZCMLLayer(FunctionalNoDevMode, __name__,
+                                'FunctionalNoDevMode')
 
 class FunctionalTestCase(unittest.TestCase):
     """Functional test case."""

Modified: Zope3/trunk/src/zope/app/twisted/main.py
===================================================================
--- Zope3/trunk/src/zope/app/twisted/main.py	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/twisted/main.py	2006-08-18 11:12:47 UTC (rev 69645)
@@ -136,8 +136,6 @@
         logging.warning("Developer mode is enabled: this is a security risk "
             "and should NOT be enabled on production servers. Developer mode "
             "can be turned off in etc/zope.conf")
-    else:
-        features += ('nodevmode',)
 
     zope.app.appsetup.config(options.site_definition, features=features)
 

Modified: Zope3/trunk/src/zope/app/wsgi/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/__init__.py	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/src/zope/app/wsgi/__init__.py	2006-08-18 11:12:47 UTC (rev 69645)
@@ -123,8 +123,6 @@
         logging.warning("Developer mode is enabled: this is a security risk "
             "and should NOT be enabled on production servers. Developer mode "
             "can be turned off in etc/zope.conf")
-    else:
-        features += ('nodevmode',)
 
     # Configure the application
     appsetup.config(options.site_definition, features=features)

Copied: Zope3/trunk/zopeskel/etc/ftesting-base.zcml (from rev 69644, Zope3/branches/3.3/zopeskel/etc/ftesting-base.zcml)

Modified: Zope3/trunk/zopeskel/etc/ftesting.zcml
===================================================================
--- Zope3/trunk/zopeskel/etc/ftesting.zcml	2006-08-18 10:58:18 UTC (rev 69644)
+++ Zope3/trunk/zopeskel/etc/ftesting.zcml	2006-08-18 11:12:47 UTC (rev 69645)
@@ -7,56 +7,6 @@
   <!-- Turn on the devmode -->
   <meta:provides feature="devmode" />
 
-  <!-- This file is the equivalent of site.zcml and it is -->
-  <!-- used for functional testing setup -->
+  <include file="ftesting-base.zcml" />
 
-  <include package="zope.app" />
-  <include package="zope.app" file="ftesting.zcml" />
-
-  <include files="package-includes/*-meta.zcml" />
-  <include files="package-includes/*-configure.zcml" />
-  <include files="package-includes/*-ftesting.zcml" />
-
-  <include file="securitypolicy.zcml" />
-  <include file="securitypolicy-ftesting.zcml" />
-
-  <!-- Principals -->
-
-  <unauthenticatedPrincipal
-      id="zope.anybody"
-      title="Unauthenticated User" />
-
-  <unauthenticatedGroup
-    id="zope.Anybody"
-    title="Unauthenticated Users"
-    />
-
-  <authenticatedGroup
-    id="zope.Authenticated"
-    title="Authenticated Users"
-    />
-
-  <everybodyGroup
-    id="zope.Everybody"
-    title="All Users"
-    />
-
-  <!-- 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" />
-
-  <includeOverrides file="overrides_ftesting.zcml" />
-
 </configure>



More information about the Zope3-Checkins mailing list