[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/site/tests/test_utility.py Use aq_get if you want to acquire and have a signature like getattr

Philipp von Weitershausen philikon at philikon.de
Sat Jul 28 20:00:53 EDT 2007


Log message for revision 78446:
  Use aq_get if you want to acquire and have a signature like getattr
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/site/tests/test_utility.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/site/tests/test_utility.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/site/tests/test_utility.py	2007-07-28 23:59:27 UTC (rev 78445)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/site/tests/test_utility.py	2007-07-29 00:00:53 UTC (rev 78446)
@@ -283,17 +283,17 @@
         # let's see if we can acquire something all the way from the
         # root (Application) object; we need to be careful to choose
         # something that's only available from the root object
-        from Acquisition import aq_acquire
+        from Acquisition import aq_get
         dummy = zapi.getUtility(IDummyUtility)
-        acquired = aq_acquire(dummy, 'ZopeAttributionButton', None)
+        acquired = aq_get(dummy, 'ZopeAttributionButton', None)
         self.failUnless(acquired is not None)
 
         name, dummy = zapi.getUtilitiesFor(IDummyUtility).next()
-        acquired = aq_acquire(dummy, 'ZopeAttributionButton', None)
+        acquired = aq_get(dummy, 'ZopeAttributionButton', None)
         self.failUnless(acquired is not None)
 
         dummy = zapi.getAllUtilitiesRegisteredFor(IDummyUtility).next()
-        acquired = aq_acquire(dummy, 'ZopeAttributionButton', None)
+        acquired = aq_get(dummy, 'ZopeAttributionButton', None)
         self.failUnless(acquired is not None)        
 
     def test_getNextUtility(self):



More information about the Zope-Checkins mailing list