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
daefa335
Commit
daefa335
authored
Jun 08, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- re-added 'extra' argument (someone was missing it)
parent
850a3626
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/Testing/ZopeTestCase/functional.py
src/Testing/ZopeTestCase/functional.py
+10
-5
No files found.
src/Testing/ZopeTestCase/functional.py
View file @
daefa335
...
...
@@ -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