[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/PageTemplate/tests - testSimpleViewClass.py:1.1.2.1.4.1 testViewZPT.py:1.1.2.2.2.1

Jim Fulton jim@zope.com
Wed, 29 May 2002 11:10:16 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/PageTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/PageTemplate/tests

Modified Files:
      Tag: Zope3InWonderland-branch
	testSimpleViewClass.py testViewZPT.py 
Log Message:
- Added permission_id attribute to adapter and utility directives.

- Got rid of old getView, getResource, and getDefaultViewName.
  Renamed getRequestView to getView (and so on).

  Changed view interface to use context, rather than getContext.

  Introduced notion of presentation types (e.g. IBrowserPresentation, 
  which is cleaner than IBrowserPublisher).

- Began converting to get/queryFoo, which is much nicer.

- Many formatting fixups.



=== Zope3/lib/python/Zope/App/PageTemplate/tests/testSimpleViewClass.py 1.1.2.1 => 1.1.2.1.4.1 ===
         
         ob = data()
-        view = SimpleTestView(ob)        
+        view = SimpleTestView(ob, None)        
         macro = view['test']
         out = view(None) # Need to past a, uh, request.
         self.assertEqual(out,


=== Zope3/lib/python/Zope/App/PageTemplate/tests/testViewZPT.py 1.1.2.2 => 1.1.2.2.2.1 ===
         self.context = context
 
-    def getContext(self):
-        return self.context
-
 class InstanceWithoutContext:
     pass
 
@@ -69,14 +66,16 @@
         getService(None,"Views").provideView(I1,
                     name=the_view_name,
                     type=the_view_type,
-                    maker=ViewMaker)
+                    maker=[ViewMaker])
         
-        from Zope.ComponentArchitecture.IViewService import IViewRequest
+        from Zope.ComponentArchitecture.IPresentationRequest \
+             import IPresentationRequest
+
         class MyRequest:
-            __implements__ = IViewRequest
-            def getViewType(self):
+            __implements__ = IPresentationRequest
+            def getPresentationType(self):
                 return the_view_type
-            def getViewSkin(self):
+            def getPresentationSkin(self):
                 return "some skin"
               
         request = MyRequest()