mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Fix closes Issue12676 - Invalid identifier used in TypeError message in http.client.
Reported by Popa Claudiu and Patch by Santoso Wijaya.
This commit is contained in:
parent
f187a0230b
commit
eb71ad4c71
2 changed files with 8 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue