[Checkins] SVN: grokproject/trunk/ Add a testbrowser test.
Maurits van Rees
m.van.rees at zestsoftware.nl
Sun May 4 12:41:47 EDT 2008
Log message for revision 86406:
Add a testbrowser test.
Changed:
U grokproject/trunk/CHANGES.txt
U grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl
-=-
Modified: grokproject/trunk/CHANGES.txt
===================================================================
--- grokproject/trunk/CHANGES.txt 2008-05-04 16:40:22 UTC (rev 86405)
+++ grokproject/trunk/CHANGES.txt 2008-05-04 16:41:46 UTC (rev 86406)
@@ -4,6 +4,8 @@
0.8 (unreleased)
------------------
+* Add a testbrowser test.
+
* Set up a functional test.
* Added a dependency on z3c.testsetup.
Modified: grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl
===================================================================
--- grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl 2008-05-04 16:40:22 UTC (rev 86405)
+++ grokproject/trunk/grokproject/template/src/+package+/app.txt_tmpl 2008-05-04 16:41:46 UTC (rev 86406)
@@ -15,3 +15,25 @@
True
>>> list(instance)
[]
+
+
+Run tests in the testbrowser
+----------------------------
+
+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
+
+Create a browser and visit the instance you just created::
+
+ >>> from zope.testbrowser.testing import Browser
+ >>> browser = Browser()
+ >>> browser.open('http://localhost/instance')
+
+Check some basic information about the page you visit::
+
+ >>> browser.url
+ 'http://localhost/instance'
+ >>> browser.headers.get('Status').upper()
+ '200 OK'
More information about the Checkins
mailing list