summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-08-02 10:33:41 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-08-02 10:33:41 (GMT)
commiteb71ad4c71a95d9b7397e3baaaadcb0687efa894 (patch)
treeb52817d527487745557e16388cc86a8fe2fbb892 /Lib/test/test_httplib.py
parentf187a0230bd6e9ad64a6249de50517b36c383c02 (diff)
downloadcpython-eb71ad4c71a95d9b7397e3baaaadcb0687efa894.zip
cpython-eb71ad4c71a95d9b7397e3baaaadcb0687efa894.tar.gz
cpython-eb71ad4c71a95d9b7397e3baaaadcb0687efa894.tar.bz2
Fix closes Issue12676 - Invalid identifier used in TypeError message in http.client.
Reported by Popa Claudiu and Patch by Santoso Wijaya.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index 890b1b9..ce9e346 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -246,6 +246,13 @@ class BasicTest(TestCase):
conn.request('GET', '/foo', body(), {'Content-Length': '11'})
self.assertEqual(sock.data, expected)
+ def test_send_type_error(self):
+ # See: Issue #12676
+ conn = client.HTTPConnection('example.com')
+ conn.sock = FakeSocket('')
+ with self.assertRaises(TypeError):
+ conn.request('POST', 'test', conn)
+
def test_chunked(self):
chunked_start = (
'HTTP/1.1 200 OK\r\n'