Skip to content
Myr

Drop private imports from test_proxies.py (#2850)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Y.D.X · committed by GitHub · parent 88e8431 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • tests:+4 added−4 removed

1 file+4 added−4 removed

modified:tests/client/test_proxies.py+4 added-4 removed
1import httpcore2import pytest34import httpx5from httpx._utils import URLPattern567def url_to_origin(url: str) -> httpcore.URL:8 """
24 unmodified lines
33 ],34)35def test_proxies_parameter(proxies, expected_proxies):36 client = httpx.Client(proxies=proxies)37 client_patterns = [p.pattern for p in client._mounts.keys()]38 client_proxies = list(client._mounts.values())3940 for proxy_key, url in expected_proxies:40 pattern = URLPattern(proxy_key)41 assert pattern in client._mounts42 proxy = client._mounts[pattern]41 assert proxy_key in client_patterns42 proxy = client_proxies[client_patterns.index(proxy_key)]43 assert isinstance(proxy, httpx.HTTPTransport)44 assert isinstance(proxy._pool, httpcore.HTTPProxy)45 assert proxy._pool._proxy_url == url_to_origin(url)46
240 unmodified lines