MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_partial_post

Method test_partial_post

Lib/test/test_xmlrpc.py:983–991  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

981 self.assertEqual(server.add("a", "\xe9"), "a\xe9")
982
983 def test_partial_post(self):
984 # Check that a partial POST doesn't make the server loop: issue #14001.
985 with contextlib.closing(socket.create_connection((ADDR, PORT))) as conn:
986 conn.send('POST /RPC2 HTTP/1.0\r\n'
987 'Content-Length: 100\r\n\r\n'
988 'bye HTTP/1.1\r\n'
989 f'Host: {ADDR}:{PORT}\r\n'
990 'Accept-Encoding: identity\r\n'
991 'Content-Length: 0\r\n\r\n'.encode('ascii'))
992
993 def test_context_manager(self):
994 with xmlrpclib.ServerProxy(URL) as server:

Callers

nothing calls this directly

Calls 4

closingMethod · 0.80
create_connectionMethod · 0.45
sendMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected