[Checkins] SVN: grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl Remove nonsensical tests that were illustrating either obvious or confusing

Philipp von Weitershausen philikon at philikon.de
Fri Jun 20 12:20:40 EDT 2008


Log message for revision 87601:
  Remove nonsensical tests that were illustrating either obvious or confusing
  things (but certainly no things worth testing).
  
  Also, rephrased introductory sentence.  Doctests should never say "test this",
  "test that" but they should tell a *story*.
  
  Removed double colons as they're unnecessary before Python interpreter sessions.
  

Changed:
  U   grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl

-=-
Modified: grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl
===================================================================
--- grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl	2008-06-20 16:11:53 UTC (rev 87600)
+++ grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl	2008-06-20 16:20:39 UTC (rev 87601)
@@ -3,18 +3,11 @@
 
 :Test-Layer: functional
 
-Test creating a ${app_class_name} instance into Grok::
+Let's first create an instance of ${app_class_name} at the top level:
 
    >>> from ${package}.app import ${app_class_name}
    >>> root = getRootFolder()
-   >>> root['instance'] = ${app_class_name}()
-   >>> root.get('instance').__class__.__name__
-   '${app_class_name}'
-   >>> instance = root.get('instance')
-   >>> isinstance(instance, ${app_class_name})
-   True
-   >>> list(instance)
-   []
+   >>> root['app'] = ${app_class_name}()
 
 
 Run tests in the testbrowser
@@ -23,17 +16,17 @@
 The zope.testbrowser.browser module exposes a Browser class that
 simulates a web browser similar to Mozilla Firefox or IE.  We use that
 to test how our application behaves in a browser.  For more
-information, see http://pypi.python.org/pypi/zope.testbrowser
+information, see http://pypi.python.org/pypi/zope.testbrowser.
 
-Create a browser and visit the instance you just created::
+Create a browser and visit the instance you just created:
 
    >>> from zope.testbrowser.testing import Browser
    >>> browser = Browser()
-   >>> browser.open('http://localhost/instance')
+   >>> browser.open('http://localhost/app')
 
-Check some basic information about the page you visit::
+Check some basic information about the page you visit:
 
    >>> browser.url
-   'http://localhost/instance'
+   'http://localhost/app'
    >>> browser.headers.get('Status').upper()
    '200 OK'



More information about the Checkins mailing list