[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/folder/ Added AppFolderLayer for existing ftests.

Baiju M baiju.m.mail at gmail.com
Mon Mar 5 07:37:17 EST 2007


Log message for revision 72982:
  Added AppFolderLayer for existing ftests.
  

Changed:
  A   Zope3/trunk/src/zope/app/folder/ftesting.zcml
  A   Zope3/trunk/src/zope/app/folder/testing.py
  U   Zope3/trunk/src/zope/app/folder/tests.py

-=-
Added: Zope3/trunk/src/zope/app/folder/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/folder/ftesting.zcml	2007-03-05 12:27:48 UTC (rev 72981)
+++ Zope3/trunk/src/zope/app/folder/ftesting.zcml	2007-03-05 12:37:17 UTC (rev 72982)
@@ -0,0 +1,12 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="zope"
+   package="zope.app.folder"
+   >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+
+  <include package="zope.app.zcmlfiles" />
+
+</configure>


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

Added: Zope3/trunk/src/zope/app/folder/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/folder/testing.py	2007-03-05 12:27:48 UTC (rev 72981)
+++ Zope3/trunk/src/zope/app/folder/testing.py	2007-03-05 12:37:17 UTC (rev 72982)
@@ -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.folder common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+AppFolderLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'AppFolderLayer', allow_teardown=True)


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

Modified: Zope3/trunk/src/zope/app/folder/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/folder/tests.py	2007-03-05 12:27:48 UTC (rev 72981)
+++ Zope3/trunk/src/zope/app/folder/tests.py	2007-03-05 12:37:17 UTC (rev 72982)
@@ -30,6 +30,7 @@
 from zope.app.component.tests.test_site import BaseTestSiteManagerContainer
 from zope.app.container.tests.test_icontainer import BaseTestIContainer
 from zope.app.container.tests.test_icontainer import DefaultTestData
+from zope.app.folder.testing import AppFolderLayer
 
 
 class Test(BaseTestIContainer, BaseTestSiteManagerContainer, TestCase):
@@ -59,11 +60,14 @@
 def test_suite():
     from zope.testing.doctestunit import DocTestSuite
     from zope.app.testing.placelesssetup import setUp, tearDown
+    flags = doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE
+    filerepresentation = FunctionalDocFileSuite("filerepresentation.txt",
+                                                optionflags=flags)
+    filerepresentation.layer = AppFolderLayer
     return TestSuite((
         makeSuite(Test),
         makeSuite(FolderMetaDataTest),
-        FunctionalDocFileSuite("filerepresentation.txt",
-                               optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE),
+        filerepresentation,
         DocTestSuite('zope.app.folder.folder',
                      setUp=setUp, tearDown=tearDown),
         ))



More information about the Zope3-Checkins mailing list