Log message for revision 39828:
  If ZopeLite was imported before these tests were run, they would fail as
  they assume the application object it the standard one which includes an
  error_log. But run in isolation they would pass.
  
  Now we make sure an error_log is present in the application object.
  

Changed:
  U   
Zope/branches/philikon-zope32-integration/lib/python/Products/SiteErrorLog/tests/testSiteErrorLog.py

-=-
Modified: 
Zope/branches/philikon-zope32-integration/lib/python/Products/SiteErrorLog/tests/testSiteErrorLog.py
===================================================================
--- 
Zope/branches/philikon-zope32-integration/lib/python/Products/SiteErrorLog/tests/testSiteErrorLog.py
        2005-11-01 21:23:17 UTC (rev 39827)
+++ 
Zope/branches/philikon-zope32-integration/lib/python/Products/SiteErrorLog/tests/testSiteErrorLog.py
        2005-11-01 21:26:30 UTC (rev 39828)
@@ -21,6 +21,10 @@
     def setUp(self):
         transaction.begin()
         self.app = makerequest(Zope2.app())
+        if not hasattr(self.app, 'error_log'):
+            # If ZopeLite was imported, we have no default error_log
+            from Products.SiteErrorLog.SiteErrorLog import SiteErrorLog
+            self.app._setObject('error_log', SiteErrorLog())
         try:
             self.app.manage_addDTMLMethod('doc', '')
         except:

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to