Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6213cc7f
Commit
6213cc7f
authored
Sep 23, 2000
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typos and misinformation about commit in Zope.debug.
parent
83e7cf7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
33 deletions
+31
-33
doc/UNITTEST.txt
doc/UNITTEST.txt
+31
-33
No files found.
doc/UNITTEST.txt
View file @
6213cc7f
...
...
@@ -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 a
s
certain 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment