[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/utility/tests - test_registered.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/utility/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/browser/services/utility/tests

Modified Files:
	test_registered.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/utility/tests/test_registered.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/utility/tests/test_registered.py:1.3	Thu Aug  7 13:41:42 2003
+++ Zope3/src/zope/app/browser/services/utility/tests/test_registered.py	Fri Nov 21 12:11:58 2003
@@ -15,11 +15,11 @@
 
 import unittest
 
+from zope.app.tests import ztapi
 from zope.app.browser.services.utility import Utilities
 from zope.app.tests import placelesssetup
-from zope.component.view import provideView
 from zope.interface import Interface, implements
-from zope.publisher.browser import BrowserView, IBrowserPresentation
+from zope.publisher.browser import BrowserView
 from zope.publisher.browser import TestRequest
 
 
@@ -85,10 +85,9 @@
 class RegisteredTest(placelesssetup.PlacelessSetup, unittest.TestCase):
 
     def test_utility(self):
-        provideView(IStub,
-                    "absolute_url",
-                    IBrowserPresentation,
-                    StubAbsoluteURL)
+        ztapi.browserView(IStub,
+                          "absolute_url",
+                          StubAbsoluteURL)
         utilityservice = StubLocalUtilityService()
         request = TestRequest()
         utilities = UtilitiesView(utilityservice, request)




More information about the Zope3-Checkins mailing list