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
9c29f86a
Commit
9c29f86a
authored
Apr 29, 2012
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httplib test for early eof response. related to Issue13684
parent
285e51b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
Lib/test/test_httplib.py
Lib/test/test_httplib.py
+9
-0
No files found.
Lib/test/test_httplib.py
View file @
9c29f86a
...
@@ -369,6 +369,15 @@ class BasicTest(TestCase):
...
@@ -369,6 +369,15 @@ class BasicTest(TestCase):
resp
.
begin
()
resp
.
begin
()
self
.
assertRaises
(
client
.
LineTooLong
,
resp
.
read
)
self
.
assertRaises
(
client
.
LineTooLong
,
resp
.
read
)
def
test_early_eof
(
self
):
# Test httpresponse with no \r\n termination,
body
=
"HTTP/1.1 200 Ok"
sock
=
FakeSocket
(
body
)
resp
=
client
.
HTTPResponse
(
sock
)
resp
.
begin
()
self
.
assertEqual
(
resp
.
read
(),
b''
)
self
.
assertTrue
(
resp
.
isclosed
())
class
OfflineTest
(
TestCase
):
class
OfflineTest
(
TestCase
):
def
test_responses
(
self
):
def
test_responses
(
self
):
self
.
assertEqual
(
client
.
responses
[
client
.
NOT_FOUND
],
"Not Found"
)
self
.
assertEqual
(
client
.
responses
[
client
.
NOT_FOUND
],
"Not Found"
)
...
...
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