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
4a76b01d
Commit
4a76b01d
authored
Jun 03, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functional.publish() would hang if it got a request_method argument other
than GET or HEAD while omitting the stdin argument.
parent
2884c777
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
+4
-0
lib/python/Testing/ZopeTestCase/functional.py
lib/python/Testing/ZopeTestCase/functional.py
+1
-1
lib/python/Testing/ZopeTestCase/testFunctional.py
lib/python/Testing/ZopeTestCase/testFunctional.py
+26
-0
No files found.
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
View file @
4a76b01d
Unreleased
- Functional.publish() would hang if it got a request_method argument other
than GET or HEAD while omitting the stdin argument.
0.9.8 (Zope 2.8 edition)
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
issues discovered during integration into Zope 2.8. Tests may still use
...
...
lib/python/Testing/ZopeTestCase/functional.py
View file @
4a76b01d
...
...
@@ -72,7 +72,7 @@ class Functional(sandbox.Sandboxed):
env
[
'HTTP_AUTHORIZATION'
]
=
"Basic %s"
%
base64
.
encodestring
(
basic
)
if
stdin
is
None
:
stdin
=
sys
.
stdin
stdin
=
StringIO
()
outstream
=
StringIO
()
response
=
Response
(
stdout
=
outstream
,
stderr
=
sys
.
stderr
)
...
...
lib/python/Testing/ZopeTestCase/testFunctional.py
View file @
4a76b01d
...
...
@@ -164,6 +164,32 @@ class TestFunctional(ZopeTestCase.FunctionalTestCase):
self
.
assertEqual
(
self
.
folder
.
new_document
.
meta_type
,
'DTML Document'
)
self
.
assertEqual
(
self
.
folder
.
new_document
(),
'foo'
)
def
testPUTEmpty
(
self
):
# PUT operation without passing stdin should result in empty content
self
.
setPermissions
([
change_dtml_documents
])
response
=
self
.
publish
(
self
.
folder_path
+
'/index_html'
,
request_method
=
'PUT'
,
basic
=
self
.
basic_auth
)
self
.
assertEqual
(
response
.
getStatus
(),
204
)
self
.
assertEqual
(
self
.
folder
.
index_html
(),
''
)
def
testPROPFIND
(
self
):
# PROPFIND should work without passing stdin
response
=
self
.
publish
(
self
.
folder_path
+
'/index_html'
,
request_method
=
'PROPFIND'
,
basic
=
self
.
basic_auth
)
self
.
assertEqual
(
response
.
getStatus
(),
207
)
def
testHEAD
(
self
):
# HEAD should work without passing stdin
response
=
self
.
publish
(
self
.
folder_path
+
'/index_html'
,
request_method
=
'HEAD'
)
self
.
assertEqual
(
response
.
getStatus
(),
200
)
def
testSecurityContext
(
self
):
# The authenticated user should not change as a result of publish
self
.
assertEqual
(
getSecurityManager
().
getUser
().
getId
(),
user_name
)
...
...
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