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
a3126269
Commit
a3126269
authored
Sep 24, 2007
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #2287: form ':record' objects did not implement enough of the mapping protocol.
parent
bcc18abb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+1
-1
lib/python/ZPublisher/tests/testHTTPRequest.py
lib/python/ZPublisher/tests/testHTTPRequest.py
+22
-0
No files found.
doc/CHANGES.txt
View file @
a3126269
...
...
@@ -8,6 +8,9 @@ Zope Changes
Bugs fixed
- Collector #2287: form ':record' objects did not implement enough
of the mapping protocol.
- Collector #2346: username logging in FCGI crashed the server
- Collector #2332: SessionDataManger: don't swallow ConflictErrors
...
...
lib/python/ZPublisher/HTTPRequest.py
View file @
a3126269
...
...
@@ -1515,7 +1515,7 @@ class record:
_guarded_writes
=
1
def
__getattr__
(
self
,
key
,
default
=
None
):
if
key
in
(
'get'
,
'keys'
,
'items'
,
'values'
,
'copy'
,
'has_key'
):
if
key
in
(
'get'
,
'keys'
,
'items'
,
'values'
,
'copy'
,
'has_key'
,
'__contains__'
,
'__iter__'
,
'__len__'
):
return
getattr
(
self
.
__dict__
,
key
)
raise
AttributeError
,
key
...
...
lib/python/ZPublisher/tests/testHTTPRequest.py
View file @
a3126269
...
...
@@ -77,6 +77,28 @@ class RecordTests( unittest.TestCase ):
d
=
eval
(
r
)
self
.
assertEqual
(
d
,
record
.
__dict__
)
def
test_contains
(
self
):
from
ZPublisher.HTTPRequest
import
record
record
=
record
()
record
.
a
=
1
self
.
assertTrue
(
'a'
in
record
)
def
test_iter
(
self
):
from
ZPublisher.HTTPRequest
import
record
record
=
record
()
record
.
a
=
1
record
.
b
=
2
record
.
c
=
3
for
k
in
record
:
self
.
assertTrue
(
k
in
(
'a'
,
'b'
,
'c'
))
def
test_len
(
self
):
from
ZPublisher.HTTPRequest
import
record
record
=
record
()
record
.
a
=
1
record
.
b
=
2
record
.
c
=
3
self
.
assertEqual
(
len
(
record
),
3
)
class
ProcessInputsTests
(
unittest
.
TestCase
):
def
_getHTTPRequest
(
self
,
env
):
...
...
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