[CMF-checkins] SVN: CMF/branches/1.6/CMFDefault/tests/test_Portal.py * fixing the assumption that the warning registry exists before our b/w

Rob Miller ra at burningman.com
Tue Nov 22 13:10:16 EST 2005


Log message for revision 40326:
  * fixing the assumption that the warning registry exists before our b/w
    compatible site creation generates a warning; last CMFDefault unit test
    is now passing
  
  

Changed:
  U   CMF/branches/1.6/CMFDefault/tests/test_Portal.py

-=-
Modified: CMF/branches/1.6/CMFDefault/tests/test_Portal.py
===================================================================
--- CMF/branches/1.6/CMFDefault/tests/test_Portal.py	2005-11-22 16:58:26 UTC (rev 40325)
+++ CMF/branches/1.6/CMFDefault/tests/test_Portal.py	2005-11-22 18:10:16 UTC (rev 40326)
@@ -221,6 +221,9 @@
         site = getattr( self.root, id )
 
         # Check that a warning was raised.
+        if registry is None:
+            # registry only exists once a warning is generated
+            registry = globals().get("__warningregistry__")
         self.assertEqual( len( registry ), 1 )
         message, category, linenoe  = registry.keys()[ 0 ]
         self.failUnless( 'manage_addCMFSite' in message, message )



More information about the CMF-checkins mailing list