[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/appsetup/tests.py Fix the tests that print deprecation warnings (caused by my previous checkin revision 66281).

Florian Lindner Florian.Lindner at xgm.de
Fri Mar 31 12:17:08 EST 2006


Log message for revision 66282:
  Fix the tests that print deprecation warnings (caused by my previous checkin revision 66281).
  

Changed:
  U   Zope3/trunk/src/zope/app/appsetup/tests.py

-=-
Modified: Zope3/trunk/src/zope/app/appsetup/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/appsetup/tests.py	2006-03-31 17:01:44 UTC (rev 66281)
+++ Zope3/trunk/src/zope/app/appsetup/tests.py	2006-03-31 17:17:07 UTC (rev 66282)
@@ -102,7 +102,7 @@
         sub_folder = root_folder['sub_folder']
         ensureUtility(sub_folder, IErrorReportingUtility,
                      'ErrorReporting', ErrorReportingUtility,
-                     'ErrorReporting')
+                     'ErrorReporting', asObject=True)
     
         # Make sure it was created on the sub folder, not the root folder
         got_utility = zapi.getUtility(IErrorReportingUtility, name='ErrorReporting',
@@ -120,10 +120,13 @@
         root_folder = self.root_folder
         for i in range(2):
             cx = self.db.open()
-            name = ensureUtility(root_folder, IErrorReportingUtility,
+            utility = ensureUtility(root_folder, IErrorReportingUtility,
                                  'ErrorReporting', ErrorReportingUtility,
-                                 'ErrorReporting')
-
+                                 'ErrorReporting', asObject=True)
+            if utility != None:
+                name = utility.__name__
+            else:
+                name = None
             if i == 0:
                 self.assertEqual(name, 'ErrorReporting')
             else:



More information about the Zope3-Checkins mailing list