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
625b1ed8
Commit
625b1ed8
authored
Jun 08, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- re-added 'extra' argument (someone was missing it)
parent
9d0c6bf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/Testing/ZopeTestCase/functional.py
src/Testing/ZopeTestCase/functional.py
+10
-5
No files found.
doc/CHANGES.rst
View file @
625b1ed8
...
...
@@ -11,6 +11,9 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- Testing: Re-added 'extra' argument to Functional.publish.
Removing it in Zope 2.13.0a1 did break backwards compatibility.
- LP #787541: Fix WSGIPublisher to close requests on abort unconditionally.
Previously an addAfterCommitHook was used, but this is not run on transaction
aborts. Now a Synchronizer is used which unconditionally closes the request
...
...
src/Testing/ZopeTestCase/functional.py
View file @
625b1ed8
...
...
@@ -53,11 +53,12 @@ class Functional(sandbox.Sandboxed):
implements
(
interfaces
.
IFunctional
)
@
savestate
def
publish
(
self
,
path
,
basic
=
None
,
env
=
None
,
request_method
=
'GET'
,
stdin
=
None
,
handle_errors
=
True
):
def
publish
(
self
,
path
,
basic
=
None
,
env
=
None
,
extra
=
None
,
request_method
=
'GET'
,
stdin
=
None
,
handle_errors
=
True
):
'''Publishes the object at 'path' returning a response object.'''
from
StringIO
import
StringIO
from
ZPublisher.Request
import
Request
from
ZPublisher.Response
import
Response
from
ZPublisher.Publish
import
publish_module
...
...
@@ -66,6 +67,8 @@ class Functional(sandbox.Sandboxed):
if
env
is
None
:
env
=
{}
if
extra
is
None
:
extra
=
{}
request
=
self
.
app
.
REQUEST
...
...
@@ -89,12 +92,14 @@ class Functional(sandbox.Sandboxed):
outstream
=
StringIO
()
response
=
Response
(
stdout
=
outstream
,
stderr
=
sys
.
stderr
)
request
=
Request
(
stdin
,
env
,
response
)
for
k
,
v
in
extra
.
items
():
request
[
k
]
=
v
publish_module
(
'Zope2'
,
response
=
response
,
stdin
=
stdin
,
environ
=
env
,
debug
=
not
handle_errors
,
request
=
request
,
response
=
response
,
)
return
ResponseWrapper
(
response
,
outstream
,
path
)
...
...
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