[Checkins] SVN: grok/trunk/src/grok/tests/form/schemainherit.py Check whether another situation also does what is expected.

Martijn Faassen faassen at infrae.com
Thu Dec 14 16:08:23 EST 2006


Log message for revision 71552:
  Check whether another situation also does what is expected.
  

Changed:
  U   grok/trunk/src/grok/tests/form/schemainherit.py

-=-
Modified: grok/trunk/src/grok/tests/form/schemainherit.py
===================================================================
--- grok/trunk/src/grok/tests/form/schemainherit.py	2006-12-14 21:06:07 UTC (rev 71551)
+++ grok/trunk/src/grok/tests/form/schemainherit.py	2006-12-14 21:08:23 UTC (rev 71552)
@@ -7,11 +7,23 @@
   >>> from zope import component
   >>> from zope.publisher.browser import TestRequest
   >>> request = TestRequest()
+
+Without AutoFields, just a simple edit form:
+
   >>> view = component.getMultiAdapter((manfred, request), name='edit')
   >>> len(view.form.form_fields)
   3
   >>> [w.__name__ for w in view.form.form_fields]
   ['name', 'size', 'speciality']
+
+With AutoFields:
+
+  >>> view = component.getMultiAdapter((manfred, request), name='edit2')
+  >>> len(view.form.form_fields)
+  3
+  >>> [w.__name__ for w in view.form.form_fields]
+  ['name', 'size', 'speciality']
+
 """
 import grok
 from zope import interface, schema
@@ -28,3 +40,9 @@
 
 class Edit(grok.EditForm):
     grok.context(Mammoth)
+
+class Edit2(grok.EditForm):
+    grok.context(Mammoth)
+
+    form_fields = grok.AutoFields(Mammoth)
+



More information about the Checkins mailing list