[Zope3-checkins] CVS: Zope3/src/zope/app/tests -
test_clipboard.py:1.9
Jim Fulton
jim at zope.com
Sat Mar 6 11:51:02 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/tests
Modified Files:
test_clipboard.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/tests/test_clipboard.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/tests/test_clipboard.py:1.8 Wed Mar 3 05:52:07 2004
+++ Zope3/src/zope/app/tests/test_clipboard.py Sat Mar 6 11:50:31 2004
@@ -18,7 +18,7 @@
from unittest import TestCase, TestSuite, main, makeSuite
from zope.app.copypastemove.interfaces import IPrincipalClipboard
from zope.app.copypastemove import PrincipalClipboard
-from zope.component import getAdapter, getService, getServiceManager
+from zope.component import getService, getServiceManager
from zope.app.tests import ztapi
from zope.app.services.principalannotation \
import PrincipalAnnotationService
@@ -51,7 +51,7 @@
annotationsvc = getService(self, 'PrincipalAnnotation')
annotations = annotationsvc.getAnnotations(user)
- clipboard = getAdapter(annotations, IPrincipalClipboard)
+ clipboard = IPrincipalClipboard(annotations)
clipboard.addItems('move', ['bla', 'bla/foo', 'bla/bar'])
expected = ({'action':'move', 'target':'bla'},
{'action':'move', 'target':'bla/foo'},
@@ -68,7 +68,7 @@
annotationsvc = getService(self, 'PrincipalAnnotation')
annotations = annotationsvc.getAnnotations(user)
- clipboard = getAdapter(annotations, IPrincipalClipboard)
+ clipboard = IPrincipalClipboard(annotations)
expected = ({'action':'move', 'target':'bla'},
{'action':'move', 'target':'bla/foo'},
@@ -84,7 +84,7 @@
user = auth.getPrincipalByLogin('srichter')
annotationsvc = getService(self, 'PrincipalAnnotation')
annotations = annotationsvc.getAnnotations(user)
- clipboard = getAdapter(annotations, IPrincipalClipboard)
+ clipboard = IPrincipalClipboard(annotations)
clipboard.clearContents()
self.failUnless(clipboard.getContents() == ())
More information about the Zope3-Checkins
mailing list