[Zope3-checkins] CVS: Zope3/src/zope/app/publication/tests - test_browserpublication.py:1.6 test_simplecomponenttraverser.py:1.3

R. Sean Bowman sean.bowman@acm.org
Thu, 6 Feb 2003 01:50:41 -0500


Update of /cvs-repository/Zope3/src/zope/app/publication/tests
In directory cvs.zope.org:/tmp/cvs-serv18167/zope/app/publication/tests

Modified Files:
	test_browserpublication.py test_simplecomponenttraverser.py 
Log Message:
finished changing service names to use strings defined in
zope/component/servicenames.py, changed the name of
ErrorReportingService to ErrorReports and Resources to ResourceService


=== Zope3/src/zope/app/publication/tests/test_browserpublication.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/publication/tests/test_browserpublication.py:1.5	Mon Jan 20 17:16:00 2003
+++ Zope3/src/zope/app/publication/tests/test_browserpublication.py	Thu Feb  6 01:49:38 2003
@@ -16,6 +16,7 @@
 from zope.interface import Interface
 
 from zope.component import getService, getServiceManager
+from zope.component.servicenames import Views
 
 from zope.publisher.publish import publish
 from zope.publisher.browser import BrowserView, TestRequest
@@ -191,7 +192,7 @@
                 self.counter+=1
                 return self.context[name]
 
-        provideView=getService(None, "Views").provideView
+        provideView=getService(None, Views).provideView
         provideView(I1, '_traverse', IBrowserPresentation, [Adapter])
         ob = mydict()
         ob['bruce'] =  SimpleObject('bruce')
@@ -214,7 +215,7 @@
             def browserDefault(self, request):
                 return (self.context['bruce'], 'dummy')
 
-        provideView=getService(None, "Views").provideView
+        provideView=getService(None, Views).provideView
         provideView(I1, '_traverse', IBrowserPresentation, [Adapter])
         ob = mydict()
         ob['bruce'] =  SimpleObject('bruce')
@@ -237,7 +238,7 @@
 
         pub = self.klass(self.db)
         ob = C()
-        provideView=getService(None, "Views").provideView
+        provideView=getService(None, Views).provideView
         provideView(I1, 'edit', IBrowserPresentation, [BobView])
 
         r = self._createRequest('/@@edit;skin=zmi',pub)
@@ -256,7 +257,7 @@
             x = SimpleObject(1)
         ob = C()
         r = self._createRequest('/x',pub)
-        provideView=getService(None, "Views").provideView
+        provideView=getService(None, Views).provideView
         provideView(None, '_traverse', IBrowserPresentation, [TestTraverser])
         ob2 = pub.traverseName(r, ob, 'x')
         self.assertEqual(removeAllProxies(ob2).v, 1)
@@ -272,7 +273,7 @@
             def __init__(self, context, request): pass
             __implements__ = IBrowserPresentation
         r = self._createRequest('/@@spam',pub)
-        provideView=getService(None, "Views").provideView
+        provideView=getService(None, Views).provideView
         provideView(I, 'spam', IBrowserPresentation, [V])
         ob2 = pub.traverseName(r, ob, '@@spam')
         self.assertEqual(removeAllProxies(ob2).__class__, V)


=== Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py:1.2	Wed Dec 25 09:13:08 2002
+++ Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py	Thu Feb  6 01:49:38 2003
@@ -20,6 +20,7 @@
 from zope.component.tests.request import Request
 from zope.app.publication.traversers import SimpleComponentTraverser
 from zope.component import getService
+from zope.component.servicenames import Views
 from zope.interface import Interface
 from zope.exceptions import NotFoundError
 from zope.app.tests.placelesssetup import PlacelessSetup
@@ -66,7 +67,7 @@
         req = Request( I, '')
 
         T = SimpleComponentTraverser(c, req)
-        getService(None,"Views").provideView(None , 'foo', I, [View])
+        getService(None,Views).provideView(None , 'foo', I, [View])
 
         self.failUnless(T.publishTraverse(req,'foo').__class__ is View )