You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.pybuild/cpython3_3.12_respx/build/tests/test_mock.py::test_proxies
/usr/lib/python3/dist-packages/httpx/_client.py:671: DeprecationWarning: The 'proxies' argument is now deprecated. Use 'proxy' or 'mounts' instead.
warnings.warn(message, DeprecationWarning)
Fix for the warning below,
--- a/tests/test_mock.py+++ b/tests/test_mock.py@@ -476,14 +476,14 @@ def test_add_remove_targets():
async def test_proxies():
with respx.mock:
respx.get("https://foo.bar/") % dict(json={"foo": "bar"})
- with httpx.Client(proxies={"https://": "https://1.1.1.1:1"}) as client:+ with httpx.Client(proxy={"https://": "https://1.1.1.1:1"}) as client:
response = client.get("https://foo.bar/")
assert response.json() == {"foo": "bar"}
async with respx.mock:
respx.get("https://foo.bar/") % dict(json={"foo": "bar"})
async with httpx.AsyncClient(
- proxies={"https://": "https://1.1.1.1:1"}+ proxy={"https://": "https://1.1.1.1:1"}
) as client:
response = await client.get("https://foo.bar/")
assert response.json() == {"foo": "bar"}
The text was updated successfully, but these errors were encountered:
About the test_respx_mock_fixture test, it's testing that the pytest respx plugin works by supplying/forcing -p respx when executing, to simulate a proper user environment, without your suggested import.
This probably breaks for you due to where executed, e.g. python path, virtual environment etc
Hi, I am getting the following test error while building the package in Debian unstable.
I have created a patch to address this error,
There is a deprecated warning too,
Fix for the warning below,
The text was updated successfully, but these errors were encountered: