[Checkins] SVN: grok/trunk/src/grok/tests/form/ Get rid of some test setup code that isn't necessary anymore.

Martijn Faassen faassen at infrae.com
Fri Dec 1 16:36:42 EST 2006


Log message for revision 71368:
  Get rid of some test setup code that isn't necessary anymore.
  

Changed:
  U   grok/trunk/src/grok/tests/form/customform.py
  U   grok/trunk/src/grok/tests/form/form.py
  U   grok/trunk/src/grok/tests/form/schemaform.py

-=-
Modified: grok/trunk/src/grok/tests/form/customform.py
===================================================================
--- grok/trunk/src/grok/tests/form/customform.py	2006-12-01 21:30:16 UTC (rev 71367)
+++ grok/trunk/src/grok/tests/form/customform.py	2006-12-01 21:36:41 UTC (rev 71368)
@@ -4,19 +4,11 @@
 
   >>> grok.grok(__name__)
 
-We need to set up the default formlib template first, because even though we
-don't use the formlib NamedTemplates directly they need to be present to create
-a formlib form.
+We only expect a single field to be present in the form, as we omitted 'size':
 
   >>> from zope import component
-  >>> from zope.formlib import form
-  >>> component.provideAdapter(form.default_page_template, name='default')
-
   >>> from zope.publisher.browser import TestRequest
   >>> request = TestRequest()
-
-We only expect a single field to be present in the form, as we omitted 'size':
-
   >>> view = component.getMultiAdapter((Mammoth(), request), name='edit')
   >>> len(view.form_fields)
   1

Modified: grok/trunk/src/grok/tests/form/form.py
===================================================================
--- grok/trunk/src/grok/tests/form/form.py	2006-12-01 21:30:16 UTC (rev 71367)
+++ grok/trunk/src/grok/tests/form/form.py	2006-12-01 21:36:41 UTC (rev 71368)
@@ -23,17 +23,9 @@
     ...
   AttributeError: 'Cave' object has no attribute 'ignored'
 
-
 A grok.EditForm is a special grok.View that renders an edit form.
 
-We need to set up the default formlib template first, because even though we
-don't use the formlib NamedTemplates directly they need to be present to create
-a formlib form.
-
-  >>> from zope import component
-  >>> from zope.formlib import form
-  >>> component.provideAdapter(form.default_page_template, name='default')
-
+  >>> from zope import component  
   >>> from zope.publisher.browser import TestRequest
   >>> request = TestRequest()
   >>> view = component.getMultiAdapter((manfred, request), name='edit')

Modified: grok/trunk/src/grok/tests/form/schemaform.py
===================================================================
--- grok/trunk/src/grok/tests/form/schemaform.py	2006-12-01 21:30:16 UTC (rev 71367)
+++ grok/trunk/src/grok/tests/form/schemaform.py	2006-12-01 21:36:41 UTC (rev 71368)
@@ -6,14 +6,7 @@
 
 A grok.EditForm is a special grok.View that renders an edit form.
 
-We need to set up the default formlib template first, because even though we
-don't use the formlib NamedTemplates directly they need to be present to create
-a formlib form.
-
   >>> from zope import component
-  >>> from zope.formlib import form
-  >>> component.provideAdapter(form.default_page_template, name='default')
-
   >>> from zope.publisher.browser import TestRequest
   >>> request = TestRequest()
   >>> view = component.getMultiAdapter((manfred, request), name='edit')



More information about the Checkins mailing list