[Zope3-checkins] SVN: Zope3/trunk/ - Added AppWSGILayer to existing
ftests
Baiju M
baiju.m.mail at gmail.com
Tue Feb 20 01:58:37 EST 2007
Log message for revision 72699:
- Added AppWSGILayer to existing ftests
- Added a note about test layer restructuring in doc/CHANGES.txt
- Delete trailing whitespaces from doc/CHANGES.txt
Changed:
U Zope3/trunk/doc/CHANGES.txt
A Zope3/trunk/src/zope/app/wsgi/ftesting.zcml
A Zope3/trunk/src/zope/app/wsgi/testing.py
U Zope3/trunk/src/zope/app/wsgi/tests.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2007-02-20 05:58:08 UTC (rev 72698)
+++ Zope3/trunk/doc/CHANGES.txt 2007-02-20 06:58:36 UTC (rev 72699)
@@ -14,13 +14,13 @@
- Added a master checkbox to the ZMI and toggles all other checkboxes in
the folder listing.
-
- - added additional parameter ``settings_overrides`` to
- zope.app.render to allow overriding of the default settings for
+
+ - added additional parameter ``settings_overrides`` to
+ zope.app.render to allow overriding of the default settings for
rendering rest files.
- Added support for multiple databases in ZODB Control View.
-
+
- zope.app.testing.functional.ZCMLLayer supports in-process tearDown.
For backwards compatibility, this feature is disabled by default.
You can enable it by passing ``allow_teardown=True`` to ``ZCMLLayer()``
@@ -84,7 +84,7 @@
- Added new Time field type to zope.schema
- IHTTPApplicationRequests emit a new event,
- IHTTPVirtualHostChangedEvent, when virtual host parameters are
+ IHTTPVirtualHostChangedEvent, when virtual host parameters are
altered.
- New Dublin Core property object that allows scalar treatment for
@@ -104,6 +104,8 @@
Restructuring
+ - Added test layers for all existing functional tests.
+
- Updated the version of Twisted to 2.5
- Implemented "Loading Configuration from the zope.app Egg" proposal.
@@ -277,7 +279,7 @@
weren't tested in asynchronous mode were fixed.
Added a heart-beat to try to detect lost server connections in
- situations where such disconnections are not reported by the OS.
+ situations where such disconnections are not reported by the OS.
- Fixed issue 664, apidoc didn't properly handle attributes that
showd up in dir() but that weren't gettable.
@@ -350,7 +352,7 @@
Much thanks to everyone who contributed to this release:
Jim Fulton, Dmitry Vasiliev, Martijn Faassen, Christian Theune, Wolfgang
- Schnerring, Fred Drake, Marius Gedminas
+ Schnerring, Fred Drake, Marius Gedminas, Baiju M
------------------------------------------------------------------
@@ -469,23 +471,23 @@
- Fixed issues 648 and 593: uploading files with non-ASCII filenames now
works.
-
+
- Fixed issue 680, html files in a resource directory was interpreted
- as page templates, which used up processing time and caused
+ as page templates, which used up processing time and caused
HTML-resources that were not valid XHTML to fail.
-
- If you want your resources in a resource directory to be interpreted
+
+ If you want your resources in a resource directory to be interpreted
as pagetemplates they now need to have a .pt or .zpt extension.
- Fixed issue 551: Sequence widget ignored default values.
-
- - Fix get_rendered in zope.formlib. Make use of get_rendered in
+
+ - Fix get_rendered in zope.formlib. Make use of get_rendered in
setUpInputWidget which is used in AddFormBase.
- Fix invariant error handling in formlib. The exception Invalid raised
in interface invariants where end in a component lookup error because
this exception didn't get converted to a usefull error message.
- Now the error_views method in formlib can handle strings and i18n
+ Now the error_views method in formlib can handle strings and i18n
Message based Invalid exceptions.
- Fixed error handling in sequence item input widget. This widget
Added: Zope3/trunk/src/zope/app/wsgi/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/ftesting.zcml 2007-02-20 05:58:08 UTC (rev 72698)
+++ Zope3/trunk/src/zope/app/wsgi/ftesting.zcml 2007-02-20 06:58:36 UTC (rev 72699)
@@ -0,0 +1,45 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zope"
+ package="zope.app.wsgi"
+ >
+
+ <!-- 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.securitypolicy" />
+
+ <securityPolicy
+ component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Manager" title="Site Manager" />
+
+ <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/wsgi/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Zope3/trunk/src/zope/app/wsgi/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/testing.py 2007-02-20 05:58:08 UTC (rev 72698)
+++ Zope3/trunk/src/zope/app/wsgi/testing.py 2007-02-20 06:58:36 UTC (rev 72699)
@@ -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.wsgi common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+AppWSGILayer = ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'AppWSGILayer', allow_teardown=True)
Property changes on: Zope3/trunk/src/zope/app/wsgi/testing.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: Zope3/trunk/src/zope/app/wsgi/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/tests.py 2007-02-20 05:58:08 UTC (rev 72698)
+++ Zope3/trunk/src/zope/app/wsgi/tests.py 2007-02-20 06:58:36 UTC (rev 72699)
@@ -26,6 +26,7 @@
from zope.app.testing import placelesssetup
from zope.app.publication.requestpublicationregistry import factoryRegistry
from zope.app.publication.requestpublicationfactories import BrowserFactory
+from zope.app.wsgi.testing import AppWSGILayer
def setUp(test):
placelesssetup.setUp(test)
@@ -97,7 +98,7 @@
def test_suite():
functional_suite = doctest.DocTestSuite()
- functional_suite.layer = zope.app.testing.functional.Functional
+ functional_suite.layer = AppWSGILayer
return unittest.TestSuite((
functional_suite,
More information about the Zope3-Checkins
mailing list