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
a6c2abea
Commit
a6c2abea
authored
Oct 26, 2008
by
Sidnei da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Launchpad #280334: Fixed problem with 'timeout'
argument/attribute missing in testbrowser tests.
parent
729d6cb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/Products/Five/testbrowser.py
lib/python/Products/Five/testbrowser.py
+7
-1
No files found.
doc/CHANGES.txt
View file @
a6c2abea
...
...
@@ -198,6 +198,9 @@ Zope Changes
Bugs Fixed
- Launchpad #280334: Fixed problem with 'timeout'
argument/attribute missing in testbrowser tests.
- Fixed against-the-rules zope.conf option 'fast_listen' to read
'fast-listen' (dash, not underscore).
...
...
lib/python/Products/Five/testbrowser.py
View file @
a6c2abea
...
...
@@ -18,6 +18,8 @@ Mostly just copy and paste from zope.testbrowser.testing.
$Id$
"""
import
sys
import
socket
import
urllib2
import
mechanize
...
...
@@ -29,7 +31,7 @@ import zope.publisher.http
class
PublisherConnection
(
testing
.
PublisherConnection
):
def
__init__
(
self
,
host
):
def
__init__
(
self
,
host
,
timeout
=
None
):
from
Testing.ZopeTestCase.zopedoctest.functional
import
http
self
.
caller
=
http
self
.
host
=
host
...
...
@@ -76,6 +78,10 @@ class PublisherHTTPHandler(urllib2.HTTPHandler):
def
http_open
(
self
,
req
):
"""Open an HTTP connection having a ``urllib2`` request."""
# Here we connect to the publisher.
if
sys
.
version_info
>
(
2
,
6
)
and
not
hasattr
(
req
,
'timeout'
):
# Workaround mechanize incompatibility with Python
# 2.6. See: LP #280334
req
.
timeout
=
socket
.
_GLOBAL_DEFAULT_TIMEOUT
return
self
.
do_open
(
PublisherConnection
,
req
)
...
...
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