mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
Fix Issue1327971: HTTPResponse should expose a proper fileno attribute
This commit is contained in:
parent
a6166dac94
commit
d389cb5bcf
3 changed files with 21 additions and 0 deletions
|
@ -285,6 +285,13 @@ class BasicTest(TestCase):
|
|||
self.assertEqual("Basic realm=\"example\"",
|
||||
resp.getheader("www-authenticate"))
|
||||
|
||||
def test_filenoattr(self):
|
||||
# Just test the fileno attribute in the HTTPResponse Object.
|
||||
body = "HTTP/1.1 200 Ok\r\n\r\nText"
|
||||
sock = FakeSocket(body)
|
||||
resp = httplib.HTTPResponse(sock)
|
||||
self.assertTrue(hasattr(resp,'fileno'),
|
||||
'HTTPResponse should expose a fileno attribute')
|
||||
|
||||
class OfflineTest(TestCase):
|
||||
def test_responses(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue