Commit 6213cc7f authored by Chris McDonough's avatar Chris McDonough

Fixed typos and misinformation about commit in Zope.debug.

parent 83e7cf7c
......@@ -17,7 +17,7 @@ Zope Unit Testing
intended behavior against its actual behavior.
Unit tests are a way for developers and quality assurance engineers
to quickly acertain whether independent units of code are working as
to quickly ascertain whether independent units of code are working as
expected. Unit tests are generally written at the same time as the
code they are intended to test. A unit testing framework allows a
collection of unit tests to be run without human intervention,
......@@ -225,7 +225,7 @@ Zope Unit Testing
- operate on the Zope instance space by calling methods from the
root object (bound to 'app'), e.g.:
app.acl_users.manage_addUser(<method signature>)
app.acl_users.manage_addUser(<parameters>)
- a transaction will not be committed to the Zope object database
until you call the global function "get_transaction().commit()",
......@@ -249,8 +249,8 @@ Zope Unit Testing
request (which a DTML method is somewhat logically designed to
serve).
If you find yourself getting bogged down while writing unit tests
by Zope's refusal to run certain methods due to missing state (like
If you find yourself getting bogged down while writing unit tests by
Zope's refusal to run certain methods due to missing state (like
REQUEST), it's useful to know about the "debug" method of the Zope
package. This method allows you to simulate a web request, which
generally provides all the state necessary to run methods which
......@@ -273,12 +273,10 @@ Zope Unit Testing
output if you do not set the silent flag.
In Zope versions before 2.2.2, all calls to Zope.debug commit the
transaction represented by the call to Zope.debug by default. Zope
2.2.2 and higher have allow an additional "dont_commit" flag to be
passed in to Zope.debug:
- 'Zope.debug('/a/url/representing/a/method?with=a?couple=arguments',
u='username:password', dont_commit=1)
transaction represented by the call to Zope.debug by default. This
can pose problems for unit testing, as the state of the environment
should not be effected by prior tests. A solution should be
available by the release of Zope 2.3.
Administrivia
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment