MCPcopy Index your code
hub / github.com/python/cpython / test_100_close

Method test_100_close

Lib/test/test_httplib.py:2037–2047  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2035 self.assertEqual(conn.connections, 2)
2036
2037 def test_100_close(self):
2038 conn = FakeSocketHTTPConnection(
2039 b'HTTP/1.1 100 Continue\r\n'
2040 b'\r\n'
2041 # Missing final response
2042 )
2043 conn.request('GET', '/', headers={'Expect': '100-continue'})
2044 self.assertRaises(client.RemoteDisconnected, conn.getresponse)
2045 self.assertIsNone(conn.sock)
2046 conn.request('GET', '/reconnect')
2047 self.assertEqual(conn.connections, 2)
2048
2049
2050class HTTPSTest(TestCase):

Callers

nothing calls this directly

Calls 5

assertIsNoneMethod · 0.80
requestMethod · 0.45
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected