[Zope3-checkins] CVS: Zope3/src/zope/app/index/text/tests - test_batchedrankedprocessor.py:1.11

Jim Fulton jim at zope.com
Sat Mar 6 11:50:58 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/index/text/tests
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/index/text/tests

Modified Files:
	test_batchedrankedprocessor.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/app/index/text/tests/test_batchedrankedprocessor.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/index/text/tests/test_batchedrankedprocessor.py:1.10	Tue Mar  2 09:40:14 2004
+++ Zope3/src/zope/app/index/text/tests/test_batchedrankedprocessor.py	Sat Mar  6 11:50:26 2004
@@ -21,8 +21,6 @@
 from zope.interface.verify import verifyObject
 from zope.interface import implements
 
-from zope.component import getAdapter
-
 from zope.index.interfaces import IQuerying
 from zope.app.index.interfaces.interfaces import \
     IBatchedResult, IRankedHubIdList
@@ -79,13 +77,13 @@
         # Do introspection on the result
 
         # BatchedResult
-        batch = getAdapter(result, IBatchedResult)
+        batch = IBatchedResult(result)
         self.failUnlessEqual(0, batch.totalSize)
         self.failUnlessEqual(0, batch.startPosition)
         self.failUnlessEqual(20, batch.batchSize)
 
         # RankedHubIdList
-        list = getAdapter(result, IRankedHubIdList)
+        list = IRankedHubIdList(result)
         self.failUnlessRaises(IndexError, list.__getitem__, 0)
 
 def test_suite():




More information about the Zope3-Checkins mailing list