[Zope3-checkins]
CVS: Zope3/src/zope/app/browser/services/service/tests
- test_service.py:1.4
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:12:30 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services/service/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/browser/services/service/tests
Modified Files:
test_service.py
Log Message:
Changed to use the new ztapi module, which provides handy functions
for setting up adapters and views for tests. This is needed because
there are no-longer global adapter and view services sitting around as
module globals.
=== Zope3/src/zope/app/browser/services/service/tests/test_service.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/service/tests/test_service.py:1.3 Wed Sep 24 16:43:10 2003
+++ Zope3/src/zope/app/browser/services/service/tests/test_service.py Fri Nov 21 12:11:57 2003
@@ -17,10 +17,9 @@
"""
import unittest
+from zope.app.tests import ztapi
from zope.interface import Interface, implements
from zope.publisher.browser import TestRequest
-from zope.component.view import provideView
-from zope.publisher.interfaces.browser import IBrowserPresentation
from zope.app.tests.placelesssetup import PlacelessSetup, setUp, tearDown
from zope.testing.doctestunit import DocTestSuite
@@ -43,8 +42,8 @@
def __str__(self):
return self.context.url
__call__ = __str__
- provideView(IFoo, 'absolute_url', IBrowserPresentation, AU)
- provideView(IFoo, 'registration.html', IBrowserPresentation, AU)
+ ztapi.browserView(IFoo, 'absolute_url', AU)
+ ztapi.browserView(IFoo, 'registration.html', AU)
context = Foo('foo_url')
request = TestRequest()
More information about the Zope3-Checkins
mailing list