Checks that IPv6 scoped addresses are properly handled end-to-end. This is not strictly speaking a pool manager unit test - this test lives here in absence of a better code location for e2e/integration tests.
(
self, create_connection: MagicMock, url: str
)
| 441 | ) |
| 442 | @patch("urllib3.util.connection.create_connection") |
| 443 | def test_e2e_connect_to_ipv6_scoped( |
| 444 | self, create_connection: MagicMock, url: str |
| 445 | ) -> None: |
| 446 | """Checks that IPv6 scoped addresses are properly handled end-to-end. |
| 447 | |
| 448 | This is not strictly speaking a pool manager unit test - this test |
| 449 | lives here in absence of a better code location for e2e/integration |
| 450 | tests. |
| 451 | """ |
| 452 | p = PoolManager() |
| 453 | conn_pool = p.connection_from_url(url) |
| 454 | conn = conn_pool._get_conn() |
| 455 | conn.connect() |
| 456 | |
| 457 | assert create_connection.call_args[0][0] == ("a::b%zone", 80) |
| 458 | |
| 459 | @patch("urllib3.connection.ssl_wrap_socket") |
| 460 | @patch("urllib3.util.connection.create_connection") |
nothing calls this directly
no test coverage detected