[Zope3-checkins] CVS: Zope3/src/zope/component/tests - placelesssetup.py:1.7

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


Update of /cvs-repository/Zope3/src/zope/component/tests
In directory cvs.zope.org:/tmp/cvs-serv29637/src/zope/component/tests

Modified Files:
	placelesssetup.py 
Log Message:
Changed to reflect merging view, resource and skin services into the
presentation service.

Also changed to create the global adapter and presentation services
rather than using module globals.


=== Zope3/src/zope/component/tests/placelesssetup.py 1.6 => 1.7 ===
--- Zope3/src/zope/component/tests/placelesssetup.py:1.6	Tue Jun  3 10:39:51 2003
+++ Zope3/src/zope/component/tests/placelesssetup.py	Fri Nov 21 12:09:32 2003
@@ -21,8 +21,8 @@
 
 from zope.testing.cleanup import CleanUp
 from zope.component import getServiceManager
-from zope.component.servicenames import Adapters, Skins, Utilities
-from zope.component.servicenames import Resources, Factories
+from zope.component.servicenames import Adapters, Utilities
+from zope.component.servicenames import Factories, Presentation
 
 class PlacelessSetup(CleanUp):
     def setUp(self):
@@ -30,35 +30,30 @@
         sm = getServiceManager(None)
         defineService = sm.defineService
         provideService = sm.provideService
+
         # factory service
         from zope.component.interfaces import IFactoryService
         defineService(Factories, IFactoryService)
         from zope.component.factory import factoryService
         provideService(Factories, factoryService)
+
         # utility service
         from zope.component.interfaces import IUtilityService
         defineService(Utilities, IUtilityService)
         from zope.component.utility import utilityService
         provideService(Utilities, utilityService)
+
         # adapter service
         from zope.component.interfaces import IAdapterService
         defineService(Adapters, IAdapterService)
-        from zope.component.adapter import adapterService
-        provideService(Adapters, adapterService)
-        # resource service
-        from zope.component.interfaces import IResourceService
-        defineService(Resources, IResourceService)
-        from zope.component.resource import resourceService
-        provideService(Resources, resourceService)
-        # skin service
-        from zope.component.interfaces import ISkinService
-        defineService(Skins, ISkinService)
-        from zope.component.skin import skinService
-        provideService(Skins, skinService)
-        # view service
-        from zope.component.interfaces import IViewService
-        defineService('Views', IViewService)
-        from zope.component.view import viewService
-        provideService('Views', viewService)
+        from zope.component.adapter import GlobalAdapterService
+        provideService(Adapters, GlobalAdapterService())
+        
+        # presentation service
+        from zope.component.interfaces import IPresentationService
+        defineService(Presentation, IPresentationService)
+        from zope.component.presentation import GlobalPresentationService
+        provideService(Presentation, GlobalPresentationService())
+
     def tearDown(self):
         CleanUp.tearDown(self)




More information about the Zope3-Checkins mailing list