Update of /cvs-repository/Products/PluginIndexes/KeywordIndex/tests
In directory 
cvs.zope.org:/tmp/cvs-serv32028/lib/python/Products/PluginIndexes/KeywordIndex/tests

Modified Files:
      Tag: tseaver-hasattr_geddon-branch
        testKeywordIndex.py 
Log Message:

  - Removed all uses of the 'hasattr' builtin from the core, where
    the object being tested derives (or might) from Persistent.
    XXX:  currently, this branch imports a 'safe_hasattr' from ZODB.utils,
    which adds a dependency on ZODB for some packages;  we probably
    need a better location, and perhas a C implementation?


=== Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py 1.6.12.2 => 
1.6.12.2.2.1 ===
--- Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py:1.6.12.2      
Fri May 27 09:03:50 2005
+++ Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py       Sat May 
28 20:41:32 2005
@@ -12,6 +12,7 @@
 ##############################################################################
 import os, sys, unittest, zLOG
 
+from ZODB.utils import safe_hasattr
 from Products.PluginIndexes.KeywordIndex.KeywordIndex import KeywordIndex
 
 class Dummy:
@@ -98,7 +99,7 @@
           '%s | %s' % ( map( None, result ),
                         map(lambda x: x[0], expectedValues ))
 
-        if hasattr(result, 'keys'): result=result.keys()
+        if safe_hasattr(result, 'keys'): result=result.keys()
         for k, v in expectedValues:
             assert k in result
 

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

Reply via email to