[CMF-checkins] SVN: CMF/trunk/CMF - simplified test setups (PlacelessSetup is no longer needed with Zope 2.9)

Yvo Schubbe y.2006_ at wcm-solutions.de
Mon Mar 27 02:55:33 EST 2006


Log message for revision 66228:
  - simplified test setups (PlacelessSetup is no longer needed with Zope 2.9)

Changed:
  U   CMF/trunk/CMFCore/exportimport/tests/test_actions.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_cachingpolicymgr.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_catalog.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_content.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_contenttyperegistry.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_mailhost.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_properties.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_skins.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
  U   CMF/trunk/CMFCore/exportimport/tests/test_workflow.py
  U   CMF/trunk/CMFCore/tests/base/testcase.py
  U   CMF/trunk/CMFCore/tests/test_ActionInformation.py
  U   CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
  U   CMF/trunk/CMFCore/tests/test_CookieCrumbler.py
  U   CMF/trunk/CMFCore/tests/test_TypesTool.py
  U   CMF/trunk/CMFCore/tests/test_fiveactionstool.py
  U   CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
  U   CMF/trunk/CMFDefault/tests/test_Image.py
  U   CMF/trunk/CMFDefault/tests/test_Portal.py
  U   CMF/trunk/CMFDefault/tests/test_join.py
  U   CMF/trunk/CMFTopic/tests/test_DateC.py

-=-
Modified: CMF/trunk/CMFCore/exportimport/tests/test_actions.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_actions.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_actions.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -25,13 +25,13 @@
 from OFS.OrderedFolder import OrderedFolder
 from Products.Five import zcml
 from zope.interface import implements
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.ActionProviderBase import ActionProviderBase
 from Products.CMFCore.interfaces import IActionsTool
 from Products.CMFCore.interfaces.portal_actions \
     import ActionProvider as IActionProvider
 from Products.CMFCore.tests.base.dummy import DummySite
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.testing import NodeAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
@@ -346,7 +346,7 @@
         self._BODY = _ACTIONSTOOL_BODY
 
 
-class _ActionSetup(PlacelessSetup, BaseRegistryTests):
+class _ActionSetup(BaseRegistryTests):
 
     def _initSite(self, foo=2, bar=2):
         self.root.site = Folder(id='site')
@@ -385,7 +385,6 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -393,7 +392,7 @@
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportActionProvidersTests(_ActionSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_cachingpolicymgr.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_cachingpolicymgr.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_cachingpolicymgr.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -21,6 +21,7 @@
 import Products
 from OFS.Folder import Folder
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.testing import NodeAdapterTestCase
@@ -28,8 +29,6 @@
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
-
 _CP_XML = """\
 <caching-policy name="foo_policy" enable_304s="False" etag_func=""
    last_modified="True" max_age_secs="0" mtime_func="object/modified"
@@ -94,7 +93,7 @@
         self._BODY = _CPM_BODY
 
 
-class _CachingPolicyManagerSetup(PlacelessSetup, BaseRegistryTests):
+class _CachingPolicyManagerSetup(BaseRegistryTests):
 
     POLICY_ID = 'policy_id'
     PREDICATE = "python:object.getId() == 'foo'"
@@ -156,14 +155,13 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.CMFCore.exportimport)
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportCachingPolicyManagerTests(_CachingPolicyManagerSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_catalog.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_catalog.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_catalog.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -27,13 +27,13 @@
 from Products.ZCTextIndex.Lexicon import Splitter
 from Products.ZCTextIndex.Lexicon import StopWordRemover
 from Products.ZCTextIndex.ZCTextIndex import PLexicon
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.tests.common import BaseRegistryTests
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
 from Products.CMFCore.CatalogTool import CatalogTool
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 
 _EMPTY_EXPORT = """\
 <?xml version="1.0"?>
@@ -76,7 +76,7 @@
     pass
 
 
-class _CatalogToolSetup(PlacelessSetup, BaseRegistryTests):
+class _CatalogToolSetup(BaseRegistryTests):
 
     def _initSite(self, foo=2):
         site = self.root.site = Folder(id='site')
@@ -104,7 +104,6 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml',
@@ -114,7 +113,7 @@
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportCatalogToolTests(_CatalogToolSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_content.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_content.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_content.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -22,16 +22,15 @@
 from ConfigParser import ConfigParser
 from StringIO import StringIO
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
+from zope.testing.cleanup import cleanUp
+
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
 from conformance import ConformsToIFilesystemImporter
 
 
-class SiteStructureExporterTests(PlacelessSetup,
-                                 unittest.TestCase,
-                                ):
+class SiteStructureExporterTests(unittest.TestCase):
 
     def _getExporter(self):
         from Products.CMFCore.exportimport.content import exportSiteStructure
@@ -95,6 +94,8 @@
                              INIAwareFileAdapter,
                             )
 
+    def tearDown(self):
+        cleanUp()
 
     def test_export_empty_site(self):
         self._setUpAdapters()

Modified: CMF/trunk/CMFCore/exportimport/tests/test_contenttyperegistry.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_contenttyperegistry.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_contenttyperegistry.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -21,14 +21,13 @@
 import Products
 from OFS.Folder import Folder
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
-
 _TEST_PREDICATES = (
  ('plain_text', 'major_minor', ('text', 'plain,javascript'), 'File'),
  ('stylesheets', 'extension', ('css,xsl,xslt',), 'Text File'),
@@ -93,7 +92,7 @@
         self._BODY = _CTR_BODY
 
 
-class _ContentTypeRegistrySetup(PlacelessSetup, BaseRegistryTests):
+class _ContentTypeRegistrySetup(BaseRegistryTests):
 
     MAJOR_MINOR_ID = _TEST_PREDICATES[0][0]
     MAJOR = _TEST_PREDICATES[0][2][0]
@@ -169,14 +168,13 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.CMFCore.exportimport)
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportContentTypeRegistryTests(_ContentTypeRegistrySetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_cookieauth.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -21,6 +21,7 @@
 import Products
 from OFS.Folder import Folder
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
@@ -28,7 +29,6 @@
 from Products.GenericSetup.tests.common import DummyImportContext
 
 from Products.CMFCore.CookieCrumbler import CookieCrumbler
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 
 _COOKIECRUMBLER_BODY = """\
 <?xml version="1.0"?>
@@ -98,7 +98,7 @@
         self._BODY = _COOKIECRUMBLER_BODY
 
 
-class _CookieCrumblerSetup(PlacelessSetup, BaseRegistryTests):
+class _CookieCrumblerSetup(BaseRegistryTests):
 
     def _initSite(self, use_changed=False):
         self.root.site = Folder(id='site')
@@ -120,14 +120,13 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.CMFCore.exportimport)
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportCookieCrumblerTests(_CookieCrumblerSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_mailhost.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_mailhost.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_mailhost.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -20,13 +20,12 @@
 
 from OFS.Folder import Folder
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.tests.common import BaseRegistryTests
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
-
 _DEFAULT_EXPORT = """\
 <?xml version="1.0"?>
 <object name="MailHost" meta_type="Mail Host" smtp_host="localhost"
@@ -40,7 +39,7 @@
 """
 
 
-class _MailHostSetup(PlacelessSetup, BaseRegistryTests):
+class _MailHostSetup(BaseRegistryTests):
 
     def _initSite(self, use_changed=False):
         from Products.MailHost.MailHost import MailHost
@@ -60,14 +59,13 @@
     def setUp(self):
         import Products.GenericSetup.MailHost
 
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.GenericSetup.MailHost)
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportMailHostTests(_MailHostSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_properties.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_properties.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_properties.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -19,14 +19,13 @@
 import Testing
 
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
 from Products.GenericSetup.tests.common import DummyExportContext
 from Products.GenericSetup.tests.common import DummyImportContext
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
-
 _PROPERTIES_BODY = """\
 <?xml version="1.0"?>
 <site>
@@ -82,7 +81,7 @@
         self._BODY = _PROPERTIES_BODY
 
 
-class _SitePropertiesSetup(PlacelessSetup, BaseRegistryTests):
+class _SitePropertiesSetup(BaseRegistryTests):
 
     def _initSite(self, foo=2, bar=2):
         from Products.CMFCore.PortalObject import PortalObjectBase
@@ -107,14 +106,13 @@
     def setUp(self):
         import Products.CMFCore.exportimport
 
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.CMFCore.exportimport)
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportSitePropertiesTests(_SitePropertiesSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_skins.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_skins.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_skins.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -26,6 +26,7 @@
 from OFS.Folder import Folder
 from Products.Five import zcml
 from zope.interface import implements
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.testing import NodeAdapterTestCase
@@ -35,7 +36,6 @@
 from Products.GenericSetup.tests.common import DummyImportContext
 
 from Products.CMFCore.interfaces import ISkinsTool
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 
 _TESTS_PATH = os.path.split(__file__)[0]
 
@@ -323,7 +323,7 @@
         BodyAdapterTestCase.tearDown(self)
 
 
-class _SkinsSetup(_DVRegistrySetup, PlacelessSetup, BaseRegistryTests):
+class _SkinsSetup(_DVRegistrySetup, BaseRegistryTests):
 
     def _initSite(self, selections={}, ids=()):
         from Products.CMFCore.DirectoryView import DirectoryView
@@ -336,7 +336,6 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         _DVRegistrySetup.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
@@ -345,7 +344,7 @@
     def tearDown(self):
         _DVRegistrySetup.tearDown(self)
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportSkinsToolTests(_SkinsSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -21,6 +21,7 @@
 import Products
 from OFS.Folder import Folder
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
@@ -30,7 +31,6 @@
 from Products.CMFCore.permissions import View
 from Products.CMFCore.permissions import AccessContentsInformation
 from Products.CMFCore.permissions import ModifyPortalContent
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.TypesTool import FactoryTypeInformation
 from Products.CMFCore.TypesTool import ScriptableTypeInformation
 from Products.CMFCore.TypesTool import TypesTool
@@ -452,7 +452,7 @@
         self._BODY = _TYPESTOOL_BODY
 
 
-class _TypeInfoSetup(PlacelessSetup, BaseRegistryTests):
+class _TypeInfoSetup(BaseRegistryTests):
 
     def _initSite(self, foo=0):
         self.root.site = Folder(id='site')
@@ -473,7 +473,6 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -481,7 +480,7 @@
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportTypesToolTests(_TypeInfoSetup):

Modified: CMF/trunk/CMFCore/exportimport/tests/test_workflow.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_workflow.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/exportimport/tests/test_workflow.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -23,6 +23,7 @@
 from OFS.SimpleItem import SimpleItem
 from Products.Five import zcml
 from zope.interface import implements
+from zope.testing.cleanup import cleanUp
 
 from Products.GenericSetup.testing import BodyAdapterTestCase
 from Products.GenericSetup.tests.common import BaseRegistryTests
@@ -32,7 +33,6 @@
 
 from Products.CMFCore.interfaces import IWorkflowDefinition
 from Products.CMFCore.interfaces import IWorkflowTool
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 
 _DUMMY_ZCML = """\
 <configure
@@ -213,7 +213,7 @@
         self._BODY = _WORKFLOWTOOL_BODY
 
 
-class _WorkflowSetup(PlacelessSetup, BaseRegistryTests):
+class _WorkflowSetup(BaseRegistryTests):
 
     def _initSite(self):
         self.root.site = Folder(id='site')
@@ -222,7 +222,6 @@
         return site
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         BaseRegistryTests.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('configure.zcml', Products.CMFCore.exportimport)
@@ -230,7 +229,7 @@
 
     def tearDown(self):
         BaseRegistryTests.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
 
 class exportWorkflowToolTests(_WorkflowSetup):

Modified: CMF/trunk/CMFCore/tests/base/testcase.py
===================================================================
--- CMF/trunk/CMFCore/tests/base/testcase.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/base/testcase.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -16,9 +16,6 @@
 from AccessControl.SecurityManagement import noSecurityManager
 from AccessControl.SecurityManager import setSecurityPolicy
 from Testing.makerequest import makerequest
-from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.testing.placelesssetup import setUp as placelessSetUp
-from zope.app.testing.placelesssetup import tearDown as placelessTearDown
 
 from dummy import DummyFolder
 from security import AnonymousUser
@@ -33,7 +30,7 @@
 
   <adapter
       for="*"
-      factory=".traversable.FiveTraversable"
+      factory="Products.Five.traversable.FiveTraversable"
       provides="zope.app.traversing.interfaces.ITraversable"
       />
 

Modified: CMF/trunk/CMFCore/tests/test_ActionInformation.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ActionInformation.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/test_ActionInformation.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -22,6 +22,7 @@
 from OFS.Folder import manage_addFolder
 from Products.Five import zcml
 from Products.PythonScripts.PythonScript import manage_addPythonScript
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.Expression import createExprContext
 from Products.CMFCore.Expression import Expression
@@ -29,7 +30,6 @@
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool as DummyMembershipTool
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import SecurityTest
 from Products.CMFCore.tests.base.testcase import TransactionalTest
 
@@ -289,11 +289,10 @@
         self.assertEqual( ai2['allowed'], True )
 
 
-class ActionInformationTests(PlacelessSetup, TransactionalTest):
+class ActionInformationTests(TransactionalTest):
 
     def setUp(self):
         import Products.CMFCore
-        PlacelessSetup.setUp(self)
         TransactionalTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -309,7 +308,7 @@
 
     def tearDown(self):
         TransactionalTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def _makeOne(self, *args, **kw):
         from Products.CMFCore.ActionInformation import ActionInformation

Modified: CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -26,6 +26,7 @@
 from App.Common import rfc1123_date
 from DateTime.DateTime import DateTime
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.FSPageTemplate import FSPageTemplate
 from Products.CMFCore.tests.base.dummy import DummyContent
@@ -34,7 +35,6 @@
 from Products.CMFCore.tests.base.dummy import DummyUserFolder
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
 from Products.CMFCore.tests.base.testcase import FSDVTest
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import RequestTest
 
 ACCLARK = DateTime( '2001/01/01' )
@@ -602,12 +602,11 @@
         self.assertEqual( headers[2][1] , 'max-age=86400' )
 
 
-class CachingPolicyManager304Tests(PlacelessSetup, RequestTest, FSDVTest):
+class CachingPolicyManager304Tests(RequestTest, FSDVTest):
 
     def setUp(self):
         from Products.CMFCore import CachingPolicyManager
 
-        PlacelessSetup.setUp(self)
         RequestTest.setUp(self)
         FSDVTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
@@ -688,7 +687,7 @@
     def tearDown(self):
         RequestTest.tearDown(self)
         FSDVTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def _cleanup(self):
         # Clean up request and response

Modified: CMF/trunk/CMFCore/tests/test_CookieCrumbler.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CookieCrumbler.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/test_CookieCrumbler.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -14,9 +14,12 @@
 
 $Id$
 """
+
 import unittest
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
+import Testing
 
+from zope.app.testing.placelesssetup import PlacelessSetup
+
 def makerequest(root, stdout, stdin=None):
     # Customized version of Testing.makerequest.makerequest()
     from cStringIO import StringIO
@@ -384,10 +387,11 @@
         bt_removed = getattr(container, '__before_traverse__')
         self.assertEqual(len(bt_removed.items()), 0)
 
+
 def test_suite():
     return unittest.TestSuite((
-                        unittest.makeSuite(CookieCrumblerTests),
-                        ))
+        unittest.makeSuite(CookieCrumblerTests),
+        ))
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')

Modified: CMF/trunk/CMFCore/tests/test_TypesTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_TypesTool.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/test_TypesTool.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -28,6 +28,7 @@
 from Products.PythonScripts.PythonScript import PythonScript
 from Products.PythonScripts.standard import html_quote
 from webdav.NullResource import NullResource
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.ActionInformation import ActionInformation
 from Products.CMFCore.PortalFolder import PortalFolder
@@ -39,7 +40,6 @@
 from Products.CMFCore.tests.base.security import OmnipotentUser
 from Products.CMFCore.tests.base.security import UserWithRoles
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import SecurityTest
 from Products.CMFCore.tests.base.testcase import WarningInterceptor
 from Products.CMFCore.tests.base.tidata import FTIDATA_ACTIONS
@@ -48,17 +48,16 @@
 from Products.CMFCore.tests.base.tidata import STI_SCRIPT
 
 
-class TypesToolTests(PlacelessSetup, SecurityTest, WarningInterceptor):
+class TypesToolTests(SecurityTest, WarningInterceptor):
 
     def _makeOne(self):
         from Products.CMFCore.TypesTool import TypesTool
 
         return TypesTool()
 
-    def setUp( self ):
+    def setUp(self):
         from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
 
-        PlacelessSetup.setUp(self)
         SecurityTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -74,7 +73,7 @@
 
     def tearDown(self):
         SecurityTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
         self._free_warning_output()
 
     def test_z2interfaces(self):

Modified: CMF/trunk/CMFCore/tests/test_fiveactionstool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_fiveactionstool.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFCore/tests/test_fiveactionstool.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -26,10 +26,6 @@
 
     Some basic setup:
 
-      >>> from Products.CMFCore.tests.base.testcase import placelessSetUp
-      >>> from Products.CMFCore.tests.base.testcase import placelessTearDown
-      >>> placelessSetUp()
-
       >>> import Products.Five
       >>> import Products.CMFCore
       >>> from Products.Five import zcml
@@ -104,9 +100,11 @@
 
     Cleanup:
 
-      >>> placelessTearDown()
+      >>> from zope.testing.cleanup import cleanUp
+      >>> cleanUp()
     """
 
+
 def test_suite():
     from Testing.ZopeTestCase import ZopeDocTestSuite
     return ZopeDocTestSuite()

Modified: CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DiscussionReply.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFDefault/tests/test_DiscussionReply.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -22,16 +22,15 @@
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import RequestTest
 
 
-class DiscussionReplyTest(PlacelessSetup, RequestTest):
+class DiscussionReplyTest(RequestTest):
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         RequestTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -61,7 +60,7 @@
     def tearDown(self):
         noSecurityManager()
         RequestTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def login(self, name):
         user = self.uf.getUserById(name)

Modified: CMF/trunk/CMFDefault/tests/test_Image.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Image.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFDefault/tests/test_Image.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -27,11 +27,11 @@
 from AccessControl.SecurityManagement import noSecurityManager
 from AccessControl.User import UnrestrictedUser
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import RequestTest
 from Products.CMFDefault import tests
 
@@ -102,13 +102,12 @@
         self.assertEqual(image.content_type, 'image/jpeg')
 
 
-class TestImageCopyPaste(PlacelessSetup, RequestTest):
+class TestImageCopyPaste(RequestTest):
 
     # Tests related to http://www.zope.org/Collectors/CMF/176
     # Copy/pasting an image (or file) should reset the object's workflow state.
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         RequestTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -136,7 +135,7 @@
     def tearDown(self):
         noSecurityManager()
         RequestTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def test_File_CopyPasteResetsWorkflowState(self):
         # Copy/pasting a File should reset wf state to private

Modified: CMF/trunk/CMFDefault/tests/test_Portal.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Portal.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFDefault/tests/test_Portal.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -21,13 +21,13 @@
 import Products
 from Acquisition import aq_base
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
 from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import SecurityRequestTest
 
 
-class CMFSiteTests(PlacelessSetup, SecurityRequestTest):
+class CMFSiteTests(SecurityRequestTest):
 
     def _makeSite( self, id='testsite' ):
 
@@ -47,7 +47,6 @@
         return content
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         SecurityRequestTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -58,7 +57,7 @@
 
     def tearDown(self):
         SecurityRequestTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def test_new( self ):
 

Modified: CMF/trunk/CMFDefault/tests/test_join.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_join.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFDefault/tests/test_join.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -20,15 +20,14 @@
 
 import Products
 from Products.Five import zcml
+from zope.testing.cleanup import cleanUp
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import TransactionalTest
 
 
-class MembershipTests(PlacelessSetup, TransactionalTest):
+class MembershipTests(TransactionalTest):
 
     def setUp(self):
-        PlacelessSetup.setUp(self)
         TransactionalTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -38,7 +37,7 @@
 
     def tearDown(self):
         TransactionalTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def _makePortal(self):
         # Create a portal instance suitable for testing

Modified: CMF/trunk/CMFTopic/tests/test_DateC.py
===================================================================
--- CMF/trunk/CMFTopic/tests/test_DateC.py	2006-03-27 07:55:22 UTC (rev 66227)
+++ CMF/trunk/CMFTopic/tests/test_DateC.py	2006-03-27 07:55:33 UTC (rev 66228)
@@ -20,8 +20,8 @@
 
 import Products
 from DateTime.DateTime import DateTime
+from zope.testing.cleanup import cleanUp
 
-from Products.CMFCore.tests.base.testcase import PlacelessSetup
 from Products.CMFCore.tests.base.testcase import RequestTest
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFTopic.Topic import Topic
@@ -150,7 +150,7 @@
         self.assertEqual( expect_now.Date(), DateTime().Date() )
         self.assertEqual( result[0][1]['range'], 'min:max' )
 
-class FriendlyDateCriterionFunctionalTests(PlacelessSetup, RequestTest):
+class FriendlyDateCriterionFunctionalTests(RequestTest):
     # Test the date criterion using a "real CMF" with catalog etc.
     selectable_diffs = [0, 1, 2, 5, 7, 14, 31, 93, 186, 365, 730]
     nonzero_diffs = [1, 2, 5, 7, 14, 31, 93, 186, 365, 730]
@@ -162,7 +162,6 @@
         import Products.Five
         from Products.Five import zcml
         import Products.GenericSetup
-        PlacelessSetup.setUp(self)
         RequestTest.setUp(self)
         zcml.load_config('meta.zcml', Products.Five)
         zcml.load_config('permissions.zcml', Products.Five)
@@ -193,7 +192,7 @@
 
     def tearDown(self):
         RequestTest.tearDown(self)
-        PlacelessSetup.tearDown(self)
+        cleanUp()
 
     def test_Harness(self):
         # Make sure the test harness is set up OK



More information about the CMF-checkins mailing list