[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Forms/Views/Browser/tests - testFormView.py:1.3
Stephan Richter
srichter@cbu.edu
Sun, 14 Jul 2002 09:32:54 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Forms/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv5853/Zope/App/Forms/Views/Browser/tests
Modified Files:
testFormView.py
Log Message:
- I finished the Schema code. We now have the following Fields defined
by default: String, Boolean, Integer, Float, Tuple, List, Dictionary
- I also reworked the Validator in a major way. A Validator now does only
one thing, such as check that a value has the right type. The Validators
are then put into a ContainerValidator which runs through all the
specified Validators. BTW, I hope you like the code... I do. :)
- Rewrote and added new tests. Note that there are no explicit tests for
the Validators, since they are tested already through the Field validate
method.
- Started working on Forms. There is a whole lot of work to be done there.
More checkins on that later...
=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testFormView.py 1.2 => 1.3 ===
from Zope.App.Forms.Views.Browser.CheckboxWidget import CheckboxWidget
import Schema
-from Schema.IField import IStr, IBool
+from Schema.IField import IString, IBoolean
from Schema import _Schema # XXX to wire things up, should fix this
#############################################################################
@@ -47,8 +47,8 @@
#############################################################################
class ITestSchema(Interface):
- foo = Schema.Str(title="Foo")
- bar = Schema.Bool(title="Bar")
+ foo = Schema.String(title="Foo")
+ bar = Schema.Boolean(title="Bar")
class TestBrowserRequest(TestRequest):
"""Since we have IBrowserViews, we need a request that works
@@ -61,8 +61,10 @@
def setUp(self):
PlacelessSetup.setUp(self)
viewService = self.getViewService()
- viewService.provideView(IStr, 'normal', IBrowserView, [TextWidget])
- viewService.provideView(IBool, 'normal', IBrowserView, [CheckboxWidget])
+ viewService.provideView(IString, 'normal', IBrowserView,
+ [TextWidget])
+ viewService.provideView(IBoolean, 'normal', IBrowserView,
+ [CheckboxWidget])
def getViewService(self):
return getService(None, 'Views')