Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
77553ab5
Commit
77553ab5
authored
Aug 04, 2007
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test for new version of urllib that uses HTTPConnection directly.
Changes the way the httplib classes are stubbed out.
parent
39b198d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_urllib.py
Lib/test/test_urllib.py
+3
-3
No files found.
Lib/test/test_urllib.py
View file @
77553ab5
...
...
@@ -111,11 +111,11 @@ class urlopen_HttpTests(unittest.TestCase):
class
FakeHTTPConnection
(
httplib
.
HTTPConnection
):
def
connect
(
self
):
self
.
sock
=
FakeSocket
(
fakedata
)
assert
httplib
.
HTTP
.
_connection_class
=
=
httplib
.
HTTPConnection
httplib
.
HTTP
.
_connection_class
=
FakeHTTPConnection
self
.
_connection_class
=
httplib
.
HTTPConnection
httplib
.
HTTP
Connection
=
FakeHTTPConnection
def
unfakehttp
(
self
):
httplib
.
HTTP
.
_connection_class
=
httplib
.
HTTPConnection
httplib
.
HTTP
Connection
=
self
.
_connection_class
def
test_read
(
self
):
self
.
fakehttp
(
b"Hello!"
)
...
...
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