diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-09-21 01:38:15 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-09-21 01:38:15 (GMT) |
commit | d389cb5bcf890c327154f79240aacc41c5174722 (patch) | |
tree | 0401713f9fcd5029a446df33ca052cf350c25b70 /Lib/test/test_httplib.py | |
parent | a6166dac9452140fd76f4f94f8d0334719d78641 (diff) | |
download | cpython-d389cb5bcf890c327154f79240aacc41c5174722.zip cpython-d389cb5bcf890c327154f79240aacc41c5174722.tar.gz cpython-d389cb5bcf890c327154f79240aacc41c5174722.tar.bz2 |
Fix Issue1327971: HTTPResponse should expose a proper fileno attribute
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r-- | Lib/test/test_httplib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 1fb810e..435a9fc 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -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): |