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

Method test_connect_with_tunnel_idna

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

Source from the content-addressed store, hash-verified

2470 self.conn.sock.data)
2471
2472 def test_connect_with_tunnel_idna(self):
2473 dest = '\u03b4\u03c0\u03b8.gr'
2474 dest_port = b'%s:%d' % (dest.encode('idna'), client.HTTP_PORT)
2475 expected = b'CONNECT %s HTTP/1.1\r\nHost: %s\r\n\r\n' % (
2476 dest_port, dest_port)
2477 self.conn.set_tunnel(dest)
2478 self.conn.request('HEAD', '/', '')
2479 self.assertEqual(self.conn.sock.host, self.host)
2480 self.assertEqual(self.conn.sock.port, client.HTTP_PORT)
2481 self.assertIn(expected, self.conn.sock.data)
2482
2483 def test_tunnel_connect_single_send_connection_setup(self):
2484 """Regresstion test for https://bugs.python.org/issue43332."""

Callers

nothing calls this directly

Calls 5

assertInMethod · 0.80
encodeMethod · 0.45
set_tunnelMethod · 0.45
requestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected