diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-08-02 18:34:53 +0800 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-08-02 18:34:53 +0800 |
commit | d61535d50b66a68cc9aecebbf5faca26d7b60a28 (patch) | |
tree | 0faef08de4cf96b597157165ab14146ebd1331d0 /Lib/test | |
parent | 328b5015a2a1c5b56ac633fa7980a361db64a016 (diff) | |
parent | eb71ad4c71a95d9b7397e3baaaadcb0687efa894 (diff) | |
download | cpython-git-d61535d50b66a68cc9aecebbf5faca26d7b60a28.tar.gz |
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')
-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 890b1b9028..ce9e34638a 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' |