[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/ftests - test_vhosting.py:1.10

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:12:47 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/traversing/ftests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/traversing/ftests

Modified Files:
	test_vhosting.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/traversing/ftests/test_vhosting.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/traversing/ftests/test_vhosting.py:1.9	Sun Sep 21 13:33:46 2003
+++ Zope3/src/zope/app/traversing/ftests/test_vhosting.py	Fri Nov 21 12:12:15 2003
@@ -17,12 +17,11 @@
 """
 
 import unittest
+from zope.app.tests import ztapi
 from zope.testing.functional import BrowserTestCase
 from zope.app.content.zpt import ZPTPage
 from zope.app.content.folder import Folder
 from transaction import get_transaction
-from zope.component.resource import provideResource
-from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.app.publisher.browser.resource import Resource
 from zope.app.traversing import traverse
 from zope.security.checker import defineChecker, NoProxy
@@ -128,7 +127,7 @@
                     'https://otherhost/bar/pt\n')
 
     def test_resources(self):
-        provideResource('quux', IBrowserPresentation, Resource)
+        ztapi.browserResource('quux', Resource)
         self.addPage('/foo/bar/pt',
                      u'<span tal:replace="context/++resource++quux" />')
         self.verify('/foo/bar/pt', 'http://localhost/@@/quux\n')




More information about the Zope3-Checkins mailing list