[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/PageTemplate/tests - testSimpleViewClass.py:1.1.2.2 testViewZPT.py:1.1.2.3
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:47 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/PageTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/PageTemplate/tests
Modified Files:
Tag: Zope-3x-branch
testSimpleViewClass.py testViewZPT.py
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals):
- RenameAllowToRequire
- GroupClassRelatedDirectivesInClassDirective
- ViewInterfaceAndSimplification
- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes
- TwoArgumentViewConstructors
- ImplementsInZCML
- SimpleViewCreationInZCML
- RemoveGetView
- ReplaceProtectWithAllow
- ViewMethodsAsViews
- MergeProtectionAndComponentDefinitions
There were also various security fixes resulting of better integration
of security with components.
=== Zope3/lib/python/Zope/App/PageTemplate/tests/testSimpleViewClass.py 1.1.2.1 => 1.1.2.2 ===
ob = data()
- view = SimpleTestView(ob)
+ view = SimpleTestView(ob, None)
macro = view['test']
- out = view(None) # Need to past a, uh, request.
+ out = view()
self.assertEqual(out,
'<html>\n'
' <body>\n'
=== Zope3/lib/python/Zope/App/PageTemplate/tests/testViewZPT.py 1.1.2.2 => 1.1.2.3 ===
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()