[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/PageTemplate/tests - testViewZPT.py:1.3
Jim Fulton
jim@zope.com
Thu, 1 Aug 2002 12:06:42 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/PageTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv10436/lib/python/Zope/App/PageTemplate/tests
Modified Files:
testViewZPT.py
Log Message:
Added type checks to registration functions to make sure interfaces
are passed where expected. A common annoying error is to pass the
module containing an interface, rather than the interface.
Interestingly, this change revealed 4 such errors in the check-in
sources.
=== Zope3/lib/python/Zope/App/PageTemplate/tests/testViewZPT.py 1.2 => 1.3 ===
def checkViewMapper(self):
the_view = "This is the view"
- the_view_type = "some view type"
+ class the_view_type(Interface): pass
the_view_name = "some view name"
def ViewMaker(*args, **kw):
return the_view