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

Method test_connect_put_request

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

Source from the content-addressed store, hash-verified

2497 msg=f'unexpected proxy data sent {proxy_setup_data_sent!r}')
2498
2499 def test_connect_put_request(self):
2500 d = {
2501 b'host': b'destination.com',
2502 b'port': client.HTTP_PORT,
2503 }
2504 self.conn.set_tunnel(d[b'host'].decode('ascii'))
2505 self.conn.request('PUT', '/', '')
2506 self.assertEqual(self.conn.sock.host, self.host)
2507 self.assertEqual(self.conn.sock.port, self.port)
2508 self.assertIn(b'CONNECT %(host)s:%(port)d HTTP/1.1\r\n'
2509 b'Host: %(host)s:%(port)d\r\n\r\n' % d,
2510 self.conn.sock.data)
2511 self.assertIn(b'PUT / HTTP/1.1\r\nHost: %(host)s\r\n' % d,
2512 self.conn.sock.data)
2513
2514 def test_connect_put_request_ipv6(self):
2515 self.conn.set_tunnel('[1:2:3::4]', 1234)

Callers

nothing calls this directly

Calls 5

assertInMethod · 0.80
set_tunnelMethod · 0.45
decodeMethod · 0.45
requestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected