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
f0739b2a
Commit
f0739b2a
authored
Jun 17, 2007
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The stringio return value is used during recursion, the deleted test asserted
the wrong thing.
parent
61002ca7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
lib/python/webdav/davcmds.py
lib/python/webdav/davcmds.py
+1
-1
lib/python/webdav/tests/test_davcmds.py
lib/python/webdav/tests/test_davcmds.py
+1
-13
No files found.
lib/python/webdav/davcmds.py
View file @
f0739b2a
...
...
@@ -479,7 +479,7 @@ class Unlock:
uri
=
urljoin
(
url
,
absattr
(
ob
.
getId
()))
self
.
apply
(
ob
,
token
,
uri
,
result
,
top
=
0
)
if
not
top
:
return
result
.
getvalue
()
return
result
if
result
.
getvalue
():
# One or more subitems probably failed, so close the multistatus
# element and clear out all succesful unlocks
...
...
lib/python/webdav/tests/test_davcmds.py
View file @
f0739b2a
...
...
@@ -21,19 +21,6 @@ class TestUnlock(unittest.TestCase):
return
self
.
token
==
token
return
Lockable
(
locktoken
)
def
test_apply_nontop_resource_returns_string
(
self
):
""" When top=0 in unlock constructor, prior to Zope 2.11, the
unlock.apply method would return a StringIO. This was bogus
because a StringIO cannot be used as a response body via the
standard RESPONSE.setBody() command. Only strings or objects
with an asHTML method may be passed into setBody()."""
inst
=
self
.
_makeOne
()
lockable
=
self
.
_makeLockable
(
None
)
result
=
inst
.
apply
(
lockable
,
'bogus'
,
url
=
'http://example.com/foo/UNLOCK'
,
top
=
0
)
self
.
failUnless
(
isinstance
(
result
,
str
))
def
test_apply_bogus_lock
(
self
):
"""
When attempting to unlock a resource with a token that the
...
...
@@ -52,6 +39,7 @@ class TestUnlock(unittest.TestCase):
lockable
=
self
.
_makeLockable
(
None
)
result
=
inst
.
apply
(
lockable
,
'bogus'
,
url
=
'http://example.com/foo/UNLOCK'
,
top
=
0
)
result
=
result
.
getvalue
()
self
.
assertNotEqual
(
result
.
find
(
'<d:status>HTTP/1.1 400 Bad Request</d:status>'
),
-
1
)
...
...
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