[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/registration/tests - test_componentpathwidget.py:1.3.6.1 test_editregistration.py:1.3.6.1 test_namecomponentregistryview.py:1.1.32.1

Jim Fulton cvs-admin at zope.org
Sun Nov 9 11:08:40 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/services/registration/tests
In directory cvs.zope.org:/tmp/cvs-serv15349/src/zope/app/browser/services/registration/tests

Modified Files:
      Tag: adaptergeddon-branch
	test_componentpathwidget.py test_editregistration.py 
	test_namecomponentregistryview.py 
Log Message:
Created a global presentation service that replaces the 
global view, resource, and skin services.

Now look up presentation components by adapting from a request type,
rather than adapting to a presentation type.





=== Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py 1.3 => 1.3.6.1 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py:1.3	Sun Sep 21 13:30:59 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py	Sun Nov  9 11:08:09 2003
@@ -18,6 +18,7 @@
 __metaclass__ = type
 
 import unittest
+from zope.app.tests import ztapi
 from zope.app.browser.services.registration import ComponentPathWidget
 from zope.app.interfaces.services.registration import IComponentRegistration
 from zope.app.interfaces.traversing import IPhysicallyLocatable
@@ -26,11 +27,9 @@
 from zope.app.location import LocationPhysicallyLocatable
 from zope.app.traversing.adapters import Traverser, DefaultTraversable
 from zope.component.adapter import provideAdapter
-from zope.component.view import provideView
 from zope.component.tests.placelesssetup import PlacelessSetup
 from zope.interface import implements, Interface
 from zope.publisher.browser import TestRequest, BrowserView
-from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.app.container.contained import Contained
 
 class Component:
@@ -61,8 +60,7 @@
         provideAdapter(None, ITraverser, Traverser)
         provideAdapter(None, ITraversable, DefaultTraversable)
         provideAdapter(None, IPhysicallyLocatable, LocationPhysicallyLocatable)
-        provideView(Interface, "absolute_url", IBrowserPresentation,
-                    AbsoluteURL)
+        ztapi.browserView(Interface, "absolute_url", AbsoluteURL)
 
         field = ComponentPath(None, title=u"Path")
         field.__name__ = u'path'


=== Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py 1.3 => 1.3.6.1 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py:1.3	Sun Sep 21 13:31:00 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py	Sun Nov  9 11:08:09 2003
@@ -19,6 +19,7 @@
 """
 __metaclass__ = type
 
+from zope.app.tests import ztapi
 from unittest import TestCase, TestSuite, main, makeSuite
 from zope.app.browser.services.registration import EditRegistration
 from zope.app.event.tests.placelesssetup import getEvents
@@ -28,11 +29,9 @@
 from zope.app.interfaces.services.registration import ActiveStatus
 from zope.app.interfaces.traversing import IContainmentRoot
 from zope.app.services.tests.placefulsetup import PlacefulSetup
-from zope.component.view import provideView
 from zope.interface import Interface, implements
 from zope.publisher.browser import BrowserView
 from zope.publisher.browser import TestRequest
-from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.app.container.contained import Contained
 
 class Container(dict):
@@ -63,7 +62,7 @@
             def setPrefix(self, p):
                 self._prefix = p
 
-        provideView(I, 'ItemEdit', IBrowserPresentation, V)
+        ztapi.browserView(I, 'ItemEdit', V)
 
         c1 = C()
         c2 = C()


=== Zope3/src/zope/app/browser/services/registration/tests/test_namecomponentregistryview.py 1.1 => 1.1.32.1 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_namecomponentregistryview.py:1.1	Sat Jun 21 17:22:03 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_namecomponentregistryview.py	Sun Nov  9 11:08:09 2003
@@ -16,12 +16,11 @@
 $Id$
 """
 
+from zope.app.tests import ztapi
 from unittest import TestCase, TestSuite, main, makeSuite
 from zope.interface import Interface, implements
 from zope.publisher.browser import TestRequest
 from zope.app.tests.placelesssetup import PlacelessSetup
-from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.component.view import provideView
 from zope.component.adapter import provideAdapter
 from zope.publisher.browser import BrowserView
 from zope.app.browser.services.registration import NameComponentRegistryView
@@ -82,9 +81,8 @@
 
     def test_update(self):
         provideAdapter(None, ITraverser, Traverser)
-        provideView(I, 'ChangeRegistrations', IBrowserPresentation, V)
-        provideView(ITestRegistration, 'absolute_url', IBrowserPresentation,
-                    AU)
+        ztapi.browserView(I, 'ChangeRegistrations', V)
+        ztapi.browserView(ITestRegistration, 'absolute_url', AU)
 
         r1 = Registry(None)
         r2 = Registry(Registration('1'))




More information about the Zope3-Checkins mailing list