[CMF-checkins] SVN: CMF/trunk/CMFCalendar/tests/test_Calendar.py - load all the related ZCML for functional testing (might be overkill, but it works)

Yvo Schubbe y.2006_ at wcm-solutions.de
Tue May 30 06:13:01 EDT 2006


Log message for revision 68393:
  - load all the related ZCML for functional testing (might be overkill, but it works)

Changed:
  U   CMF/trunk/CMFCalendar/tests/test_Calendar.py

-=-
Modified: CMF/trunk/CMFCalendar/tests/test_Calendar.py
===================================================================
--- CMF/trunk/CMFCalendar/tests/test_Calendar.py	2006-05-30 09:30:06 UTC (rev 68392)
+++ CMF/trunk/CMFCalendar/tests/test_Calendar.py	2006-05-30 10:12:59 UTC (rev 68393)
@@ -22,14 +22,18 @@
 
 import locale
 
+import Products
+import transaction
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
 from AccessControl.User import UnrestrictedUser
 from DateTime import DateTime
+from Products.Five import zcml
 from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
 from Products.Transience.Transience import TransientObjectContainer
 from Testing.makerequest import makerequest
-import transaction
+from zope.testing.cleanup import cleanUp
+
 from Products.CMFCore import Skinnable
 
 
@@ -109,6 +113,13 @@
 class CalendarRequestTests(unittest.TestCase):
 
     def setUp(self):
+        zcml.load_config('meta.zcml', Products.Five)
+        zcml.load_config('configure.zcml', Products.Five)
+        zcml.load_config('configure.zcml', Products.GenericSetup)
+        zcml.load_config('configure.zcml', Products.CMFCalendar)
+        zcml.load_config('configure.zcml', Products.CMFCore)
+        zcml.load_config('configure.zcml', Products.CMFDefault)
+        zcml.load_config('configure.zcml', Products.DCWorkflow)
         self._oldSkindata = Skinnable.SKINDATA.copy()
         transaction.begin()
 
@@ -138,6 +149,7 @@
         transaction.abort()
         self.app._p_jar.close()
         Skinnable.SKINDATA = self._oldSkindata
+        cleanUp()
 
     def _testURL(self,url,params=None):
         Site = self.Site



More information about the CMF-checkins mailing list