[Zope3-checkins] CVS: Zope3/src/zope/app/component/tests -
test_directives.py:1.25
Jim Fulton
jim at zope.com
Sat Mar 6 11:50:49 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/component/tests
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/component/tests
Modified Files:
test_directives.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/component/tests/test_directives.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/component/tests/test_directives.py:1.24 Fri Mar 5 17:08:59 2004
+++ Zope3/src/zope/app/component/tests/test_directives.py Sat Mar 6 11:50:18 2004
@@ -27,7 +27,7 @@
from zope.component import getView, queryView, queryResource
from zope.component import createObject
from zope.component import getDefaultViewName
-from zope.component import getAdapter, queryAdapter
+from zope.component import queryAdapter
from zope.component import getNamedAdapter, queryNamedAdapter
from zope.component import getUtility, queryUtility
@@ -122,7 +122,7 @@
"""
)))
- self.assertEqual(getAdapter(Content(), IApp).__class__, Comp)
+ self.assertEqual(IApp(Content()).__class__, Comp)
def testNamedAdapter(self):
@@ -131,7 +131,7 @@
from zope.component.tests.components import Content, IApp, Comp
self.testAdapter()
- self.assertEqual(getAdapter(Content(), IApp).__class__, Comp)
+ self.assertEqual(IApp(Content()).__class__, Comp)
self.assertEqual(queryNamedAdapter(Content(), IV, 'test'),
None)
@@ -167,7 +167,7 @@
"""
)))
- adapter = ProxyFactory(getAdapter(Content(), IApp))
+ adapter = ProxyFactory(IApp(Content()))
items = [item[0] for item in getTestProxyItems(adapter)]
self.assertEqual(items, ['a', 'f'])
self.assertEqual(getProxiedObject(adapter).__class__, Comp)
More information about the Zope3-Checkins
mailing list