diff --git a/tests/test_client.py b/tests/test_client.py index 057c4a4..33ac17f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -892,9 +892,10 @@ def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> N client = DefaultHttpxClient() - mounts = tuple(client._mounts.items()) - assert len(mounts) == 1 - assert mounts[0][0].pattern == "https://" + proxy_mounts = { + pattern.pattern: transport for pattern, transport in client._mounts.items() if transport is not None + } + assert "https://" in proxy_mounts @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") def test_default_client_creation(self) -> None: @@ -1778,9 +1779,10 @@ async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch client = DefaultAsyncHttpxClient() - mounts = tuple(client._mounts.items()) - assert len(mounts) == 1 - assert mounts[0][0].pattern == "https://" + proxy_mounts = { + pattern.pattern: transport for pattern, transport in client._mounts.items() if transport is not None + } + assert "https://" in proxy_mounts @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") async def test_default_client_creation(self) -> None: